更新时间: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';
另见:
Python MySQL OperationalError: 1045, "访问被拒绝用户 root@'localhost'
MySQL错误:#1045-用户' root' @' localhost'的访问被拒绝(使用密码:是)
错误 1045 (28000):访问被拒绝用户 'root'@'localhost'(使用密码:NO)
mysql& gt;使用mysql;但是...错误1044(42000):用户''的访问被拒绝@' localhost'到数据库' mysql'