MySQL 5.7 Reference Manual Including MySQL NDB Cluster 7.5 and NDB Cluster 7.6
Given a Performance Schema thread ID, returns the
account associated with the thread.
user_name@host_name
in_thread_id BIGINT UNSIGNED: The
thread ID for which to return the account. The value
should match the THREAD_ID column
from some Performance Schema
threads table row.
mysql> SELECT sys.ps_thread_account(sys.ps_thread_id(CONNECTION_ID()));
+----------------------------------------------------------+
| sys.ps_thread_account(sys.ps_thread_id(CONNECTION_ID())) |
+----------------------------------------------------------+
| root@localhost |
+----------------------------------------------------------+