zacky31

今天在 Mac 上安装了 MySQL 5.7 ,启动服务后,输入 mysql -u root -p 后,输入初始密码程,尝试执行 show databases; 

报了一个 You must reset your password using ALTER USER statement before executing this statement. 错误。

参考 Stack Overflow 上一篇文章 https://stackoverflow.com/questions/33467337/reset-mysql-root-password-using-alter-user-statement-after-install-on-mac

步骤如下:

set password = password('your new password');

alter user 'root'@'localhost' password expire never;

flush privileges;

 

相关文章:

  • 2021-08-15
  • 2021-06-07
  • 2022-12-23
  • 2021-08-23
  • 2022-01-11
  • 2021-05-19
  • 2022-01-31
  • 2021-10-17
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-23
  • 2021-05-25
  • 2021-09-19
相关资源
相似解决方案