Query below returns list of users in current database.
select host, user as username, password, password_expired from mysql.user order by user;
- host - user host limitation (% means all hosts)
- username - user name
- password - hashed password encoded with plugin
- password_expired - indicate if password is expired
- One row represents one user in the database
- Scope of rows: all users in the database
- Ordered by user name
You can vew database users using MySQL Workbench. In the Navigator select Users and Privileges position (1). List of users will appear in new tab (2).