mysql get user name code example
Example 1: how to check username in mysql command line
SELECT User, Host FROM mysql.user;
Example 2: mysql current user
-- mysql current user:
SELECT USER();
-- or
SELECT CURRENT_USER();
SELECT User, Host FROM mysql.user;
-- mysql current user:
SELECT USER();
-- or
SELECT CURRENT_USER();