SELECT 'db',User,Host FROM db WHERE Db='mydatabase' UNION SELECT 'table',Host FROM tables_priv WHERE Db='mydatabase' UNION SELECT 'col',Host FROM columns_priv WHERE Db='mydatabase'
应该告诉你你需要什么