2012-03-27 14 views
15
show grants for [email protected]'localhost'; 

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

i utilizadocomando CREATE negado a usuario

grant all on charmstyle_com to [email protected]'localhost' IDENTIFIED BY 't1q4gytrur'; 
flush privileges; 

entonces puedo importar la base de datos, se muestra un error:

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

Respuesta

22

Se concede los permisos sólo a la 'charmstyle_com' tabla dentro de la base de datos 'charmstyle_com'. Lo que probablemente quiere es conceder permisos a todas las tablas (o al menos la mesa 'adminnotification_inbox') 'charmstyle_com'

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

alternativamente

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