Is there a whoami-like function in mysql?
whoami
I\'m connecting to the mysql command line from a remote host. I\'m not sure if my ip address is resolving to a do
You can use the CURRENT_USER and USER functions as follows:
CURRENT_USER
USER
SELECT CURRENT_USER(); SELECT USER();
CURRENT_USER shows who you are authenticated as, while USER shows who you tried to authenticate as.
See the MySQL manual for more information.