All Products
Search
Document Center

:DMS cannot connect to the MySQL server and reports an error: check the connection address, network access, and whitelist settings

Last Updated:Mar 27, 2023

Problem description

We failed to connect to the MySQL server because DMS and the MySQL server cannot be connected. We recommend that you check the connection strings, network conditions, and whitelist settings before trying again.

The cause of the problem and solution

Causes

Solution

MySQL server not started.

  1. Check the firewall rules of the ECS instance or the MySQL server.

    ps -ef | grep mysql
  2. To perform the above-described command did not appear with the MySQL process, the MySQL process does not start, run the following command to start the MySQL process after re-connected.

    systemctl start mysqld

The Firewall limits of the ECS instance or the host where the user-created MySQL server is located.

  1. Check the firewall rules of the ECS instance or the MySQL server.Confirm that the MySQL service port (the default port is 3306) is open.

  2. Confirm that the IP address of DMS is not restricted or add to the firewall whitelist.

The ECS Security Group is not open to DMS.

Add the IP address of the DMS enterprise to the inbound settings of the security group of the ECS instance.

MySQL servers only allow local login by the root account.

  1. Check whether the root account is only allowed to log on to the local server.

    show grants for root@'%';
  2. If the query results to only allow root account log on locally, it can be accessed with members in the system, execute the following command to allow root account in any remote address service.

    use mysql; update user set host = '%' where user = 'root'; FLUSH PRIVILEGES;
Note

you can specify any remote address. To ensure data security, we recommend that you set a value based on your needs.

Application scope

  • Data Management