试试这个:
SELECT * FROM `information_schema`.`SCHEMA_PRIVILEGES`;
或者
SELECT * FROM `information_schema`.`USER_PRIVILEGES`;
为您的用户更改 root 用户...
SELECT Host, Select_priv, Insert_priv, Update_priv, Delete_priv FROM mysql.user WHERE USER = "root";
SELECT Host, Create_priv, Drop_priv, Reload_priv, Shutdown_priv FROM mysql.user WHERE USER = "root";
SELECT Host, Process_priv, File_priv, Grant_priv, References_priv FROM mysql.user WHERE USER = "root";
SELECT Host, Index_priv, Alter_priv, Show_db_priv, Super_priv FROM mysql.user WHERE USER = "root";
SELECT Host, Create_tmp_table_priv, Lock_tables_priv, Execute_priv FROM mysql.user WHERE USER = "root";
SELECT Host, Repl_slave_priv, Repl_client_priv, Create_view_priv FROM mysql.user WHERE USER = "root";
SELECT Host, Show_view_priv, Create_routine_priv, Alter_routine_priv FROM mysql.user WHERE USER = "root";
SELECT Host, Create_user_priv, Event_priv, Trigger_priv, Create_tablespace_priv FROM mysql.user WHERE USER = "root";
SELECT Host, ssl_type , ssl_cipher , x509_issuer, x509_subject, max_questions FROM mysql.user WHERE USER = "root";
SELECT Host, max_updates, max_connections, max_user_connections FROM mysql.user WHERE USER = "root";
SELECT Host, plugin, authentication_string FROM mysql.user WHERE USER = "root";