MySQL SYSTEM_USER() Function
The MySQL SYSTEM_USER() function returns the user name and host name provided by the client connection.
The SYSTEM_USER() function is equivalent to USER() and SESSION_USER().
SYSTEM_USER() Syntax
Here is the syntax of the MySQL SYSTEM_USER() function:
SYSTEM_USER()
Parameters
The MySQL SYSTEM_USER() function does not require any parameters.
Return value
The SYSTEM_USER() function returns a string containing the user name and host name presented by the client connection.
SYSTEM_USER() Examples
The following example shows the user name and host name presented by a client connection.
SELECT SYSTEM_USER();
+--------------------+
| SYSTEM_USER() |
+--------------------+
| [email protected] |
+--------------------+This illustrative output shows the client account and host returned for the current connection.