Information Functions Changing the session value of the  pseudo_thread_id  system variable changes the value returned by the  CONNECTION_ID()  function. Returns a  utf8  string containing the current active roles for the current session, separated by commas, or  NONE  if there are none. The value reflects the setting of the  sql_quote_show_create  system variable. Suppose that an account is granted roles as follows: In sessions for  u1 , the initial  CURRENT_ROLE()  value names the default account roles. Using  SET ROLE  changes that: Returns the user name and host name combination for the MySQL account that the server used to authenticate the current client. This account determines your access privileges. The return value is a string in the  utf8  character set. The value of  CURRENT_USER()  can differ from the value of  USER() . The example illustrates that although the client specified a user name of  davida  (as indicated by the value of the  USER()  function), the server authenticated the client using an anonymous user account (as mysql>  SELECT USER(); -> ’davida@localhost’ mysql>  SELECT * FROM mysql.user; ERROR 1044: Access denied for user ’’@’localhost’ to database ’mysql’ mysql>  SELECT CURRENT_USER(); -> ’@localhost’ • CURRENT_USER ,  CURRENT_USER() • CURRENT_ROLE() GRANT ’r1’, ’r2’ TO ’u1’@’localhost’; SET DEFAULT ROLE ALL TO ’u1’@’localhost’; Warning -> 23786 2282 mysql>  SELECT CURRENT_ROLE(); mysql>  SET ROLE ’r1’; SELECT CURRENT_ROLE(); +-------------------+ | CURRENT_ROLE() | +-------------------+ | ‘r1‘@‘%‘,‘r2‘@‘%‘ | +-------------------+ +----------------+ | CURRENT_ROLE() | +----------------+ | ‘r1‘@‘%‘ | +----------------+