How do I see client connections in AWS Aurora (MYSQL) to both reader and writer?

2.4k views Asked by At

I'm trying to find a count/list of all user connections to both the reader and writer instance. I understand that show full processlist; will give me a list of connected users, but it won't show me what host a user is connected to.

I would love to do this with a SQL statement if it's possible.

Any help is appreciated.

2

There are 2 answers

1
hiropon On

I think information_schema.PROCESSLIST contains the information.

SELECT * FROM information_schema.PROCESSLIST;

This table has HOST column, it should have client IP address.

0
Michael - sqlbot On

I understand that show full processlist; will give me a list of connected users, but it won't show me what host a user is connected to.

SHOW FULL PROCESSLIST shows only the connections to the specific Aurora instance that you are connected to when you run the query.

To retrieve the clients for the entire cluster, you need to connect to each instance in the cluster, and run the same query.