How to get connection details for another connection open to database
What you are asking for is only available in MySQL 5.7. It's a new thing I have not played with yet.

It is in the performance_schema database (a.k.a. Performance Schema System Variable Tables)


session_variables : System variables for the current session. An application that wants all system variable values for its own session should use this table. It includes the session variables for its session, as well as the values of global variables that have no session counterpart.
variables_by_thread : Session system variables for each active session. An application that wants to know the session variable values for specific sessions should use this table. It includes session variables only, identified by thread ID.


It looks like this

mysql&gt; desc performance_schema.variables_by_thread;
+----------------+---------------------+------+-----+---------+-------+
| Field          | Type                | Null | Key | Default | Extra |
+----------------+---------------------+------+-----+---------+-------+
| THREAD_ID      | bigint(20) unsigned | NO   |     | NULL    |       |
| VARIABLE_NAME  | varchar(64)         | NO   |     | NULL    |       |
| VARIABLE_VALUE | varchar(1024)       | YES  |     | NULL    |       |
+----------------+---------------------+------+-----+---------+-------+
3 rows in set (0.01 sec)


To address the question, you would need to run somthing like

SELECT * FROM performance_schema.variables_by_thread WHERE thread_id = 6649;


If you want that kind of access to other connections, you must upgrade to MySQL 5.7.

Sorry, there is nothing else available in MySQL 5.6 and prior.