我正试图将priv授予我的django用户,但出现了一个错误,即在user表中找不到任何匹配的行。它是用户表。 `mysql> select user,grant_priv from user; +
b4qexyjb1#
3mpgtkmj2#
-----+
4jb9z9bj3#
--+这是数据库。mysql> show databases; +
这是数据库。
bogh5gae4#
q7solyqu5#
从根用户运行:
grant all privileges on django.* to 'django'@'localhost' identified by '';
mysql> grant all privileges on testdb1.* to 'user1'@'localhost' identified by 'user1'; Query OK, 0 rows affected, 1 warning (0.01 sec) mysql> flush privileges; Query OK, 0 rows affected (0.02 sec)
anauzrmj6#
--+ | root | Y | | mysql.session | N | | mysql.sys | N | | django | N | +
qxgroojn7#
--+ | user | grant_priv | +
fkaflof68#
+我使用下面的代码得到了错误。mysql> grant all privileges on django.* to django@localhost identified by ''; ERROR 1133 (42000): Can't find any matching row in the user table顺便说一句,我试过了FLUSH PRIVILEGES;` 也一样,不工作。有人帮忙吗?谢谢!
我使用下面的代码得到了错误。
顺便说一句,我试过了
qmb5sa229#
wmtdaxz310#
10条答案
按热度按时间b4qexyjb1#
3mpgtkmj2#
-----+
4jb9z9bj3#
--+
这是数据库。
mysql> show databases; +bogh5gae4#
-----+
q7solyqu5#
从根用户运行:
编辑-示例
anauzrmj6#
--+ | root | Y | | mysql.session | N | | mysql.sys | N | | django | N | +
qxgroojn7#
--+ | user | grant_priv | +
fkaflof68#
+
我使用下面的代码得到了错误。
mysql> grant all privileges on django.* to django@localhost identified by ''; ERROR 1133 (42000): Can't find any matching row in the user table顺便说一句,我试过了
FLUSH PRIVILEGES;` 也一样,不工作。有人帮忙吗?谢谢!
qmb5sa229#
-----+
wmtdaxz310#