欢迎访问我的独立博客

mysql修改密码与password字段不存在mysqladmin connect to server at localhost failed

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';

posted @ 2018-07-19 10:44  github.com/starRTC  阅读(677)  评论(0编辑  收藏  举报