List all MySQL users
12 March 2022 (Updated 12 March 2022)
SELECT host, user, plugin FROM mysql.user;
Example output:
+-----------+----------------------------+-----------------------+
| host | user | plugin |
+-----------+----------------------------+-----------------------+
| % | john | mysql_native_password |
| localhost | debian-sys-maint | caching_sha2_password |
| localhost | mysql.infoschema | caching_sha2_password |
| localhost | mysql.session | caching_sha2_password |
| localhost | mysql.sys | caching_sha2_password |
| localhost | root | auth_socket |
+-----------+----------------------------+-----------------------+
Tagged:
MySQL
Thanks for your comment 🙏. Once it's approved, it will appear here.
Leave a comment