Help Center> Relational Database Service> User Guide (Ankara Region)> FAQs> Database Connection> How Do I Check the Connections to an RDS for MySQL Instance?
Updated on 2024-04-11 GMT+08:00

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. (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 Metric 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.