创建用户,授予和刷新后访问被拒绝的mysql

时间:2013-10-06 20:06:23

标签: mysql

我正在制作https://stackoverflow.com/a/18756674/1197775

但我得到了这个:

mysql -uspot -pfakepasswd
ERROR 1045 (28000): Access denied for user 'spot'@'localhost' (using password: YES)

如何调试此问题?

更新

我也试过MySQL ERROR 1045 (28000): Access denied for user 'bill'@'localhost' (using password: YES)

不再是匿名用户,但还没有运气。

更新2

SELECT User,Host FROM mysql.user;

+------------------+-------------------+
| User             | Host              |
+------------------+-------------------+
| root             | 127.0.0.1         |
| root             | ::1               |
| spot             | %                 |
| root             | localhost         |
+------------------+-------------------+

1 个答案:

答案 0 :(得分:0)

尝试'mysql -u spot -p'然后输入密码。