Chinaunix

标题: mysql 不能远程授权的问题(1044) [打印本页]

作者: riryka    时间: 2017-10-21 01:56
标题: mysql 不能远程授权的问题(1044)
本帖最后由 riryka 于 2017-10-21 01:58 编辑

mysql 5.7.19
客户端登录的root
root有权限GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'.
但是执行某个具体的表时GRANT ALL ON j.* TO juser@'%';
提示1044错误
<e>Query: grant all on j.* to juser@'%'

Error Code: 1044
Access denied for user 'root'@'%' to database 'j'

这是什么原因呢
作者: seesea2517    时间: 2017-10-23 17:06
你在控制台上执行下面两个语句看看是什么样的输出:
  1. select current_user();
  2. show grants for current_user();
复制代码

作者: lyhabc    时间: 2017-10-23 17:56
root有权限GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'.

缺少了with grant option权限吧
作者: chengchow    时间: 2017-10-24 09:37
root@%不是root@localhost,没有grant权限
这个需要用update语句修改




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2