CREATE command denied to user?

醉酒当歌 提交于 2019-11-27 06:34:29

问题


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' 

i used

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'

回答1:


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' 

alternatively

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


来源:https://stackoverflow.com/questions/9887364/create-command-denied-to-user

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!