从书上抄了以下两句执行时报题目所示错误
mysql> GRANT RELOAD,PROCESS ON *.* TO 'admin'@'localhost';
mysql> GRANT USAGE ON *.* TO 'dummy'@'localhost';
执行结果如下:
mysql> GRANT RELOAD,PROCESS ON *.* TO 'admin'@'localhost';
ERROR 1133 (42000): Can't find any matching row in the user table
mysql> GRANT USAGE ON *.* TO 'dummy'@'localhost';
ERROR 1133 (42000): Can't find any matching row in the user table
其实如果事先在mysql.user表中存在admin和dummy两个用户就正常了。
另外,将这两句末尾加上identified by '密码' 也就正常了
mysql> GRANT select ON *.* TO 'admin'@'localhost' identified by '123';
Query OK, 0 rows affected (0.00 sec)
参考: