How Do I Check the Connections to an RDS for MySQL Instance?
Use either of the following methods:
- Log in to the instance as user root and run the following command to view the threads running on it:
show full processlist;
- Id: Thread ID. You can use kill id to terminate a thread.
- User: User used for connecting to the instance.
- Host: IP address and port of the host that connects to the instance.
- db: Database name.
- Command: Connection status, which is usually Sleep, Query, or Connect.
- Time: Connection duration, in seconds.
- State: Status of the SQL statement being executed.
- Info: SQL statement that is being executed.
- Memory_used: Memory usage of the current connection.
- Memory_used_by_query: Memory usage of the current query.
- CPU_time: Amount of time for which the current connection has been established. (This column has a value for the latest minor version of MySQL 5.6. But for MySQL 5.7 and 8.0, such information is not collected, so this column is left blank.)
- Trx_executed_time: Execution time of the current transaction.
- On the Instances page, locate the instance and click View Metrics in the Operation column.
View Total Connections. Generally, the primary and standby DB instances occupy two connections. If there are more than two connections, the instance is being connected and used by other users.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot