MySQL | SESSION_USER( ) Function Last Updated : 25 Nov, 2019 Comments Improve Suggest changes Like Article Like Report The MySQL SESSION_USER() function is used for returning the current user name and host name for the MySQL connection being used by the user. The SESSION_USER() function does not require any parameter to be passed. The user name returned by the SESSION_USER() function is the name of the user-specified when connecting to the server whereas the host name returned by the SESSION_USER() function is the name of the client host that the user uses to establish a connection from. Syntax: SESSION_USER() Parameters Used: It does not require any parameter or argument to be passed. Return Value: The MySQL SESSION_USER() function returns the current user name and host name for the MySQL connection. Supported Versions of MySQL MySQL 5.7 MySQL 5.6 MySQL 5.5 MySQL 5.1 MySQL 5.0 MySQL 4.1 MySQL 4.0 MySQL 3.23 Example: Implementing SESSION_USER() function in MySQL. SELECT SESSION_USER(); Output: author@gfg Comment More info S Shubrodeep Banerjee Follow Improve Article Tags : SQL mysql SQLmysql Explore SQL Tutorial 7 min read BasicsWhat is SQL? 6 min read SQL Data Types 3 min read SQL Operators 5 min read SQL Commands | DDL, DQL, DML, DCL and TCL Commands 5 min read SQL Database Operations 3 min read SQL CREATE TABLE 3 min read Queries & OperationsSQL SELECT Query 2 min read SQL INSERT INTO Statement 4 min read SQL UPDATE Statement 3 min read SQL DELETE Statement 3 min read SQL - WHERE Clause 3 min read SQL | Aliases 3 min read SQL Joins & FunctionsSQL Joins (Inner, Left, Right and Full Join) 4 min read SQL CROSS JOIN 2 min read SQL | Date Functions 4 min read SQL | String functions 6 min read Data Constraints & Aggregate FunctionsSQL NOT NULL Constraint 2 min read SQL PRIMARY KEY Constraint 5 min read SQL Count() Function 7 min read SQL SUM() Function 5 min read SQL MAX() Function 4 min read AVG() Function in SQL 4 min read Advanced SQL TopicsSQL Subquery 4 min read Window Functions in SQL 6 min read SQL Stored Procedures 7 min read SQL Triggers 5 min read SQL Performance Tuning 6 min read SQL TRANSACTIONS 6 min read Database Design & SecurityIntroduction of ER Model 10 min read Introduction to Database Normalization 6 min read SQL Injection 11 min read SQL Data Encryption 5 min read SQL Backup 4 min read What is Object-Relational Mapping (ORM) in DBMS? 7 min read Like