mysqladmin: connect to server at 'localhost' failed

 

 

停止mysql服务

systemctl stop mysql

 

 

安全模式启动

chown -R mysql.mysql /var/run/mysqld/

mysqld_safe --skip-grant-tables &

 

 

无密码root帐号登陆

mysql -uroot -p //要求输入密码的时候,直接回车

 

update user set password=password("guxxxxxahyVh") where user='root' and host='localhost';

flush privileges;

 

ERROR 1054 (42S22): Unknown column 'password' in 'field list'

select * from user \G;

password字段改成了authentication_string

 

update user set authentication_string=password("Isssss88") where user='root' and host='localhost';


时间宝贵,只能复制+粘贴,若图片无法显示或排版混乱,请访问elesos.com查找原文