mysql5.5 5.6 SHOW GRANTS FOR mysql> SELECT DISTINCT CONCAT('SHOW GRANTS FOR ''',user,'''@''',host,''';') AS query FROM mysql.user; +------------------------------------------------------+ | CONCAT('SHOW GRANTS FOR ''',user,'''@''',host,''';') | +----…