作为 root mysql 用户,我执行了以下操作:
grant all on mydb.* to john identified by 'john1';
然后从shell,我尝试通过登录
mysql -h localhost -u john -pjohn1;
但是当我这样做时,我得到了错误
ERROR 1045 (28000): Access denied for user 'john'@'localhost' (using password: YES)
如何让 john 登录到 mysql 终端?我是否需要使用 root mysql 用户来更改 mysql.user 表中的某些内容?
谢谢