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

原文地址:https://www.cnblogs.com/elesos/p/9334463.html