how to find mysql user code example
Example 1: see all users mysql
mysql> select host, user, password from mysql.user;
Example 2: how to check username in mysql command line
SELECT User, Host FROM mysql.user;
Example 3: mysql current user
-- mysql current user:
SELECT USER();
-- or
SELECT CURRENT_USER();