1、查看日志:
rpm安装,cd /var/log/mysqld.log
2、user表插入
INSERT INTO user VALUES ('localhost','root','*6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N');
3、修改my.cnf(在/etc目录下)
找到mysqld关键词,在下面插入:skip-grant-tables
4、重启mysql服务,注意有报错查看日志