http://www.cnblogs.com/wangs/p/3346767.html
http://blog.csdn.net/u010603691/article/details/50379282
mysql.server start
mysql.server stop
方法3: 用UPDATE直接编辑user表
mysql -u root
mysql> use mysql;
mysql> UPDATE user SET Password = PASSWORD('newpass') WHERE user = 'root';
更改语句替换为update mysql.user set authentication_string=password('root') where user='root' ;
mysql> FLUSH PRIVILEGES;
登录:
mysql -u root -proot
quit