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

相关文章:

  • 2021-12-09
  • 2022-12-23
  • 2021-11-20
  • 2021-11-14
  • 2021-08-13
  • 2021-08-23
  • 2021-07-05
猜你喜欢
  • 2022-01-04
  • 2021-05-23
  • 2021-08-17
  • 2021-06-18
  • 2022-12-23
  • 2021-09-23
相关资源
相似解决方案