Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 38.0Mb
PDF (A4) - 38.0Mb
PDF (RPM) - 37.3Mb
HTML Download (TGZ) - 10.3Mb
HTML Download (Zip) - 10.3Mb
HTML Download (RPM) - 8.9Mb
Man Pages (TGZ) - 216.8Kb
Man Pages (Zip) - 329.6Kb
Info (Gzip) - 3.4Mb
Info (Zip) - 3.4Mb
Excerpts from this Manual

MySQL 5.7 Reference Manual  /  ...  /  The ps_thread_account() Function

26.4.5.14 The ps_thread_account() Function

Given a Performance Schema thread ID, returns the user_name@host_name account associated with the thread.

This function was added in MySQL 5.7.9.

Parameters
  • 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.

Return Value

A TEXT value.

Example
mysql> SELECT ps_thread_account(ps_thread_id(CONNECTION_ID()));
+--------------------------------------------------+
| ps_thread_account(ps_thread_id(CONNECTION_ID())) |
+--------------------------------------------------+
| root@localhost                                   |
+--------------------------------------------------+

User Comments
Sign Up Login You must be logged in to post a comment.