CURRENT_USER, CURRENT_USER()

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

1. SELECT CURRENT_USER();

Examples

1. mysql> select current_user();
2. +----------------+
3. | current_user() |
4. +----------------+
5. | root@0.0.0.0   |
6. +----------------+
7. 1 row in set (0.00 sec)