Curriculum
Course: MYSQL
Login

Curriculum

MYSQL

MySQL References

0/140
Text lesson

CURRENT_USER

Example

Retrieve the user name and host name associated with the MySQL account.

SELECT CURRENT_USER();

Definition and Usage

The CURRENT_USER() function retrieves the user name and host name of the MySQL account that authenticated the current client connection to the server.

The result is returned as a string in the UTF8 character encoding.

Tip: Also refer to the USER() function for related information.

Syntax

CURRENT_USER()

Technical Details

Works in:

 From MySQL version 4.0