???????windows?????MySQL????????
?????????Windows????????MySQL??????????????????
????1.??????????е?MySQL????net stop mysql?? ??windows ??????????н??? mysqld.exe ??????? ?????????????????? mysql???? ??????????
??????????????????:
????C:UsersAdministrator>net stop mysql
????MySQL ??????????.
????MySQL ????????????
????2.???????У????mysql??bin???£?
??????????????????:
????C:UsersAdministrator>cd C:Program FilesMySQLMySQL Server 5.5in
????C:Program FilesMySQLMySQL Server 5.5in>
????3.????mysqld -nt --skip-grant-tables
????????????????д?????????????
???????skip-grant-tables??????????????????????У??;
??????????????????:
????C:Program FilesMySQLMySQL Server 5.5in>mysqld -nt --skip-grant-tables
????140317 13:23:11 [Warning] option 'new': boolean value 't' wasn't recognized. Set
????to OFF.
????4.???????????У??????????DOS???????????????????????mysql??bin???£?
????5.??????? mysql ?????????????????????MySQL????? >
??????????????????:
????C:UsersAdministrator>cd C:Program FilesMySQLMySQL Server 5.5in
????C:Program FilesMySQLMySQL Server 5.5in>mysql
????Welcome to the MySQL monitor. Commands end with ; or g.
????Your MySQL connection id is 1
????Server version: 5.5.35 MySQL Community Server (GPL)
????Copyright (c) 2000?? 2013?? Oracle and/or its affiliates. All rights reserved.
????Oracle is a registered trademark of Oracle Corporation and/or its
????affiliates. Other names may be trademarks of their respective
????owners.
????Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
????mysql>
????6.?л???mysql??
??????????????????:
????mysql>USE mysql;
????7.??????????????
??????????????????:
????UPDATE user SET password=PASSWORD("123456") WHERE user="root";
????8.?????????????????
??????????????????:
????mysql>FLUSH PRIVILEGES;
????9.?????(??????????? ??quit??exit??ctrl+c??q ????;
????10.???????????????????MySQL????????????root?????????????????????
????????????mysql??????????????
????????????£?????????????????????????????????root???????????????
????1.????1????mysqladmin
??????????????????:
????mysqladmin -u root password "123456";
???????root??????ù????????????·???
??????????????????:
????mysqladmin -u root password -p "123456";
????2.????2?? ??SET PASSWORD????????????FLUSH PRIVILEGES;
??????????????????:
????mysql -u root -p
????mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('123456');
????3.????3?? ??UPDATE????user??
??????????????????:
????mysql> USE mysql;
????mysql> UPDATE user SET Password = PASSWORD('123456') WHERE user='root';
??????????windows??????MySQL??????????????????????????????????mysql????????.