26.4.5.14 The ps_thread_account() Function
Given a Performance Schema thread ID, returns the account associated with the thread. user_name@host_name
Parameters
in_thread_id BIGINT UNSIGNED: The thread ID for which to return the account. The value should match theTHREAD_IDcolumn from some Performance Schemathreadstable row.
Return Value
A TEXT value.
Example
mysql> SELECT sys.ps_thread_account(sys.ps_thread_id(CONNECTION_ID()));
+----------------------------------------------------------+
| sys.ps_thread_account(sys.ps_thread_id(CONNECTION_ID())) |
+----------------------------------------------------------+
| root@localhost |
+----------------------------------------------------------+
© 2025 Oracle
Licensed under the GPLv2 License.