且构网

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

用户"root" @"localhost"的访问被拒绝(使用密码:是)-没有权限?

更新时间:2023-09-28 14:10:58

使用

Use the instructions for resetting the root password - but instead of resetting the root password, we'll going to forcefully INSERT a record into the mysql.user table

在init文件中,改用它

In the init file, use this instead

INSERT INTO mysql.user (Host, User, Password) VALUES ('%', 'root', password('YOURPASSWORD'));
GRANT ALL ON *.* TO 'root'@'%' WITH GRANT OPTION;