how do I see which user I am logged in as in MySQL?

Actually, you need to use two functions

SELECT USER(),CURRENT_USER();

USER() reports how you attempted to authenticate in MySQL

CURRENT_USER() reports how you were allowed to authenticate in MySQL

Sometimes, they are different


I found this user() function

select user(); Will show you which user is logged in.


Does

select user();

work?

I pinched it from the 3rd google result for 'mysql whoami':


You can use 'status':

MariaDB [my_database]> status

Current user: root@localhost