且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

自动生成临时密码后无法访问MySQL

更新时间:2023-02-04 09:57:47

尝试一下:

mysql -u root -h 127.0.0.1 -p
Enter password: (enter the random password here)

参考: https://dev.mysql.com/doc /refman/5.7/en/data-directory-initialization-mysqld.html

在此之后,您可以使用 ALTER USER 'root'@'localhost' IDENTIFIED BY 'new-password';

Following this, you may reset your password using ALTER USER 'root'@'localhost' IDENTIFIED BY 'new-password';