????MySQL???????????root???????????е??????????Windows ?? Linux ?μ????????÷?????
????Windows:
????1.??????????????????
????2.??cmd-----net start ??mysql????????????????net stop mysql.
????3.???mysql?????d:usrlocalmysql4in???
????4.????????????mysql.
????d:usrlocalmysqlinmysqld-nt --skip-grant-tables
????5.???′?cmd??????d:usrlocalmysql4in?£?
????d:usrlocalmysqlinmysqladmin -u root flush-privileges password "newpassword"
????d:usrlocalmysqlinmysqladmin -u root -p shutdown ??????????????????
????6.??cmd??net start mysql
????7.?????

????Linux:
????MySQL root?????????????
?????????????MySQL root?????????????·????????????
????1.KILL???????MySQL?????
????killall -TERM MySQLd
????2.?????????????MySQL???????????????????
????safe_MySQLd --skip-grant-tables &
????3.??????????????root?????? MySQL??
????MySQL -u root
????4.???root?????????
????MySQL> update MySQL.user set password=PASSWORD('??????') where User='root';
????MySQL> flush privileges;
????MySQL> quit
???????????MySQL????????????????????
????MySQLroot?????????????
?????п??????????? safe_MySQLd ????(????????????? ubuntu???????? apt-get?????MySQL) ?? ???淽????????
????1.??MySQLd??
????sudo /etc/init.d/MySQL stop
????(????????????????????????MySQLd?????п?????)
????2.?????????????MySQL???????????????????
????MySQLd --skip-grant-tables &
????3.??????????????root?????? MySQL??
????MySQL -u root
????4.???root?????????
????MySQL> update MySQL.user set password=PASSWORD('newpassword') where User='root';
????MySQL> flush privileges;
????MySQL> quit
???????????MySQL
????/etc/init.d/MySQL restart
????????????????? newpassword ??????