Can I use wildcards to see the grants of all users in MySQL 8.0 ?
SHOW GRANTS FOR '%'@'%'; doesn't work.
I 've had exported all the SHOW GRANT statements for all users into a text like this:
SELECT CONCAT('SHOW GRANTS FOR ''',user,'''@''',host,''';') FROM mysql.user WHERE mysql.user.user NOT IN ('mysql.infoschema','mysql.session','mysql.sys') INTO outfile '/var/lib/mysql-files/show_grants.txt';
but I don't know how to use it in order to create a table with 2 columns (1 for the user and 1 for the grants).