CURRENT_USER, CURRENT_USER()¶
Returns the current user account; the returned account format is username@hostname.
Description¶
Returns the current user account; the returned account format is username@hostname. The return value is a string in the utf8mb3 character set.
Syntax¶
SELECT CURRENT_USER();
Examples¶
mysql> select current_user();
+----------------+
| current_user() |
+----------------+
| root@localhost |
+----------------+
1 row in set (0.00 sec)