修改MySQL 的权限
grant all privileges on *.* to 'root'@‘%’ IDENTIFIED BY '123' WITH GRANT OPTION;
FLUSH PRIVILEGES;
删除多余会对权限造成影响的数据
use mysql
delete from user where host !='%' # Be careful when do this step on production
刷新权限
开机自动启动 chkconfig mysqld on 为root用户设置密码为root mysqladmin -u root password 'root' 登录
mysql -u root -p
转自:http://blog.csdn.net/haohaixingyun/article/details/52217136