Simplest way to check if current user has permission to a MySQL table (from PHP / mysqli) for some desired operation?
Perhaps this can lead to some SELECTs to solve your problem?

For the 'ana_index':

mysql&gt; SHOW GRANTS FOR ana_index@localhost;
| GRANT USAGE ON *.* TO 'ana_index'@'localhost' IDENTIFIED BY PASSWORD '*...'
| GRANT ALL PRIVILEGES ON `test`.* TO 'ana_index'@'localhost'


These tables were populated:

mysql&gt; SELECT * FROM mysql.user WHERE user = 'ana_index'\G
*************************** 1. row ***************************
              Host: localhost
              User: ana_index
          Password: *1E62D0DB2482ED4455102B56D823285C02BAAF8F
       Select_priv: N
       Insert_priv: N
       Update_priv: N
       Delete_priv: N
       Create_priv: N
(etc)

mysql&gt; SELECT * FROM mysql.db WHERE user = 'ana_index'\G
*************************** 1. row ***************************
             Host: localhost
               Db: test
             User: ana_index
      Select_priv: Y
      Insert_priv: Y
      Update_priv: Y
      Delete_priv: Y
      Create_priv: Y
        Drop_priv: Y
       Grant_priv: N
(etc)


mysql.user says what permissions, if any, the user has for all databases.

mysql.db says what permissions the user has for particular database(s), test in this example.