MySQL USER() Function
Example
Return the user name and host name for the current MySQL user:
SELECT USER();
Try it Yourself »
Definition and Usage
The USER() function returns the user name and host name for the current MySQL user.
Note: The SESSION_USER() and SYSTEM_USER() functions are synonyms for the USER() function.
Tip: See also the CURRENT_USER() function.
Syntax
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 |
---|