Sep 162011
Show the current user in MySQL
Answer:
Like in the shell, we can execute the command whoami to find out the current user name, we can use the function CURRENT_USER();
E.g.
mysql> SELECT CURRENT_USER();
+----------------+
| CURRENT_USER() |
+----------------+
| root@localhost |
+----------------+
1 row in set (0.00 sec)