当我尝试'spot'@'localhost'
通过其密码标识的用户访问我的数据库时出现此错误。
PermissionsError: (1045, "Access denied for user 'spot'@'localhost' (using password: YES)", None)
我使用以下两行创建此用户:
create user 'spot'@'localhost' identified by 'fakepasswd';
grant all privileges on *.* to 'spot'@'localhost';
当我在本地运行此代码时,它工作正常。当我在另一台机器上运行此代码时,出现上述错误。然而,当我show grants for 'spot'@'localhost'
在两台机器上运行时,它们都给了我相同的输出:
GRANT ALL PRIVILEGES ON *.* TO 'spot'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4FRO4CA44C47D54D78478C7E2BD7B7'
如何调试此访问问题?