title: Mysql Revoke permission for root user
body: <p>I need to revoke permission for root user in mySql. root user should not be able to create and drop tables in the database.</p>
  
  <p>I checked revoke command but somehow it is not working for root user. If I create a new user and revoke permission, it works, what am I missing for root user or we can't revoke permission for 'root'?</p>
  
  <pre><code>SHOW GRANTS FOR root@localhost;
  </code></pre>
  
  <p>--Displays</p>
  
  <pre><code>GRANT RELOAD, SHUTDOWN, PROCESS, FILE, SHOW DATABASES, SUPER, REPLICATION SLAVE, REPLICATION CLIENT, CREATE USER, CREATE TABLESPACE ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*7BB96B4D3E986612D96E53E62DBE9A38AAA40A5A'
  
  GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `%`.* TO 'root'@'localhost' WITH GRANT OPTION
  
  GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION
  </code></pre>
  
  <p>Then</p>
  
  <pre><code>REVOKE all on myDb.* from root@'%';
  FLUSH PRIVILEGES;
  </code></pre>
  
  <blockquote>
    <blockquote>
      <p>Access denied for user 'root'@'localhost' to database 'myDb'</p>
    </blockquote>
  </blockquote>