how to get username using mysql command client code example Example: how to check username in mysql command line SELECT User, Host FROM mysql.user;