CURRENT_USER()
This page is part of MariaDB's Documentation.
The parent of this page is: Functions for MariaDB Xpand
Topics on this page:
Overview
Returns the user and host of the current client connection.
USAGE
CURRENT_USER()
DETAILS
CURRENT_USER()
is an information function that returns the user name and host name (separated by @
) that was used by the server to authenticate the current client connection.
The return value is a string in the utf8 character set.
The user returned can differ from that of USER()
since the authenticating user may not exactly match the name in the authentication request.
EXAMPLES
SELECT CURRENT_USER();
+----------------+
| CURRENT_USER() |
+----------------+
| 'tester'@'%' |
+----------------+