Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have launched an application on a shared server but I cannot INSERT any data. I thought maybe I don't have privileges so I did SHOW GRANTS in my application then die()

The result was [ EDITED ]:

  [Grants for gigfa_11863212@%] => GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES ON `gigfa_11863212_life_journal`.* TO 'gigfa_11863212'@'%'
  [Grants for gigfa_11863212@%] => GRANT USAGE ON *.* TO 'gigfa_11863212'@'%' IDENTIFIED BY PASSWORD '*78839FD7FF9639FB72CCB5E9D8BCD81A7A0A9E3D' WITH MAX_QUERIES_PER_HOUR 80000 MAX_UPDATES_PER_HOUR 60000 MAX_CONNECTIONS_PER_HOUR 20000

Why do I get the following error message when I issue an INSERT statement?

< INSERT command denied to user 'user'@'host' for table 'table' >

share|improve this question

migrated from Dec 3 '12 at 2:43

This question came from our site for professional and enthusiast programmers.

When you connect to the database, please run the following query: SELECT USER(),CURRENT_USER(); and tell us the output of this query. – RolandoMySQLDBA Dec 3 '12 at 16:08

You have granted usage to user@% but all other things to usr@%.

share|improve this answer
i just replaced my actual user_name and host_name with usr .. the one you saw was just a missed-type! :) – dariush Dec 3 '12 at 0:36
Miss-type? Copy+Paste will prevent that. :) – GolezTrol Dec 3 '12 at 1:05
add the exact result of SHOW GRANTS when logged in with that user. Also include the exact insert command and error message. We need to be able to confirm you're doing what you think you are. – Gavin Towey Dec 3 '12 at 1:11
@Gavin: To show EXACT result of SHOW GRANTS the main question is edited. To show the EXACT INSERT command, right now i don't have access to my codes! i post them ASAP – dariush Dec 3 '12 at 15:39
Are you connecting from localhost or another host? – Ilion Dec 3 '12 at 16:03
up vote 0 down vote accepted

I am totally stupid ...

I my entire project which designed and developed locally and code-line's count reaches about 15000 lines, I just mentioned my local database JUST one time in my entire project! and see the result of that!!! I have been down for this about 24 hours!

Thank you all guys for trying to help


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.