且构网

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

Python MySQL OperationalError: 1045, "访问被拒绝用户 root@'localhost'

更新时间:2022-05-14 08:48:15

您可以尝试在末尾添加 GRANT OPTION :

You can try adding GRANT OPTION at the end:

GRANT all privileges on TESTDB.* to 'Max'@'localhost' IDENTIFIED BY 'maxkim' WITH GRANT OPTION;

您还可以使用以下命令查找用户的授权:

You can also use the below command to find the grants for a user:

SHOW GRANTS FOR 'Max'@'localhost';

另见: