0

Granted SELECT, INSERT, UPDATE, DELETE, ALTER, CREATE, DROP on a database to one of our account and flushed privileges as well but still when I run drop table db_name.table_name with the same account for the same database I get error "ERROR 1142: DROP command denied to user". Same goes for ALTER as well. Not sure what the issue is.

  • The error message is incomplete, server always sends user and hostname. – Georg Richter Sep 02 '22 at 08:17
  • `select current_user(); show grants;`. Also don't need `flush privileges` when giving grants. – danblack Sep 02 '22 at 08:22
  • select current_user(); srvMariaSWE@% show grants; GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER ON `agileorg`.* TO `srvMariaSWE`@`%` drop table `agileorg`.`agileorg_entityid_demo` Error Code: 1142. DROP command denied to user 'srvMariaSWE'@'xx.xxx.xxx.xx' for table 'agileorg_entityid_demo' xx.xxx.xxx.xx is my system IP address – RAUSHAN KUMAR Sep 02 '22 at 09:16
  • It's hard to tell what your comment means. Please [edit] your question to include the information in your comment, properly formatted. The meaning of the error message is plain: the MySQL user for your session lacks the 'DROP' and 'ALTER' grants on the database and/or table in question. Some user having those grants will have to grant them to your user. [See this](https://dev.mysql.com/doc/refman/5.7/en/grant.html#:~:text=The%20WITH%20GRANT%20OPTION%20clause,GRANT%20USAGE%20ON%20*.). – O. Jones Sep 03 '22 at 10:08

0 Answers0