This tutorial explains how to use the MySQL USER function with syntax and examples.
The MySQL USER function returns the user name and host name for the current MySQL user.
The syntax for the USER function in MySQL is:
There are no parameters or arguments for the USER function in MySQL.
The USER function can be used in the following versions of MySQL:
Let's look at some MySQL USER function examples and explore how to use the USER function in MySQL.
For example:
This USER function example would return the user name and host name for the current MySQL user.
So if the user name specified when connecting to the server was 'root' and the name of the client host that the user connected from was 'imac.AODBA.com: