添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

How do I check running queries for my Amazon RDS MySQL DB instance?

2 minute read
0

I need to see which queries are actively running on an Amazon Relational Database Service (Amazon RDS) DB instance that is running MySQL. How can I do this?

Resolution

To see which queries are actively running for MySQL DB instance on Amazon RDS, follow these steps:

1. Connect to the DB instance running the MySQL .

2.    Run the following command:

SHOW FULL PROCESSLIST\G

Note : If you don't use the FULL keyword, only the first 100 characters of each statement are shown in the Info field.

3.    Or, run the following query to retrieve the same result set:

SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST

Note: Your user account must be granted the administration privilege for the MySQL PROCESS server to see all the threads running on an instance of MySQL. Otherwise, SHOW PROCESSLIST shows only the threads associated that are with the MySQL account that you're using. Also note that SHOW FULL PROCESSLIST and INFORMATION_SCHEMA.PROCESSLIST statements can negatively affect performance because they require a mutex.