bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

MySQL CURRENT_USER() Function

Concept visual

MySQL CURRENT_USER() Function

Pointer walk
two pointers
leftright102132436485116
left=0
right=6
1
3

Start at both ends

Example

Return the user name and host name for the MySQL account:

SELECT CURRENT_USER();

Definition and Usage

The CURRENT_USER() function returns the user name and host name for the MySQL account that the server used to authenticate the current client. The result is returned as a string in the UTF8 character set.

Tip:

See also the USER() function.

Syntax

CURRENT_USER()

Technical Details

Works in:

From MySQL 4.0

Previous

❮ MySQL Functions

Next

Previous

MySQL CONVERT() Function

Next

MySQL DATABASE() Function