CURRENT_USER_NAME()

Description

CURRENT_USER_NAME() is used to query the name of the user you are currently logged in as.

Syntax

  1. > CURRENT_USER_NAME()

Examples

  1. mysql> select current_user_name();
  2. +---------------------+
  3. | current_user_name() |
  4. +---------------------+
  5. | root |
  6. +---------------------+
  7. 1 row in set (0.01 sec)