CREATE命令被拒绝给用户? [英] CREATE command denied to user?

查看:188
本文介绍了CREATE命令被拒绝给用户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

show grants for charm@'localhost';

---------------------+
| Grants for charm@localhost                                                                                   |
+-----------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'charm'@'localhost' IDENTIFIED BY PASSWORD '*EDD1CD76B1331E363B2BAED3F0B7EAF28559FBEWD' |
| GRANT ALL PRIVILEGES ON `charmstyle_com`.`charmstyle_com` TO 'charm'@'localhost' 

我用过

grant all on charmstyle_com to charm@'localhost' IDENTIFIED BY 't1q4gytrur';
flush privileges;

然后我导入数据库,它显示错误:

then i import the database,it shows an error:

   ERROR 1142 (42000) at line 29: CREATE command denied to user 'charm'@'localhost' for table 'adminnotification_inbox'

推荐答案

您只向用户授予了'charmstyle_com'数据库中的'charmstyle_com'表的权限.您可能想要的是授予"charmstyle_com"(或至少"adminnotification_inbox"表)中所有表的权限

You granted the user permissions only to the 'charmstyle_com' table inside the 'charmstyle_com' database. What you probably want is to grant permissions to all the tables in 'charmstyle_com' (or at least the 'adminnotification_inbox' table)

 GRANT ALL PRIVILEGES ON `charmstyle_com`.* TO 'charm'@'localhost' 

或者

 GRANT ALL PRIVILEGES ON `charmstyle_com`.`adminnotification_inbox` 
     TO 'charm'@'localhost' 

这篇关于CREATE命令被拒绝给用户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆