This tutorial explains how to use the MySQL SESSION_USER function with syntax and examples.
The MySQL SESSION_USER function returns the user name and host name for the current MySQL user.
The syntax for the SESSION_USER function in MySQL is:
There are no parameters or arguments for the SESSION_USER function in MySQL.
The SESSION_USER function can be used in the following versions of MySQL:
Let's look at some MySQL SESSION_USER function examples and explore how to use the SESSION_USER function in MySQL.
For example:
This SESSION_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: