THE WORLD'S LARGEST WEB DEVELOPER SITE

MySQL SESSION_USER() Function

❮ MySQL Functions

Example

Return the current user name and host name for the MySQL connection:

SELECT SESSION_USER();
Try it Yourself »

Definition and Usage

The SESSION_USER() function returns the current user name and host name for the MySQL connection.

Note: The SESSION_USER() and SYSTEM_USER() functions are synonyms for the USER() function.

Syntax

SESSION_USER()

Technical Details

Works in: MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0, MySQL 3.23

❮ MySQL Functions