All pages
Powered by GitBook
1 of 1

Loading...

SESSION_USER

Return the current user name. This function returns the user name and host name as provided by the client when connecting.

Syntax

SESSION_USER()

Description

Shows the value of CURRENT_USER() when the session was created, that is, it shows a user@host pair from the , like CURRENT_USER(), but unlike CURRENT_USER() it will not change inside stored routines and views. This is SQL Standard behavior for the SESSION_USER function.

SESSION_USER() is a synonym for .

Backward-compatible behavior can be restored by setting old mode to .

This page is licensed: GPLv2, originally from

mysql.global_priv table
USER()
SESSION_USER_IS_USER
fill_help_tables.sql