All Products
Search
Document Center

Fixes for common database logon errors

Last Updated: Apr 15, 2020

The following error messages may appear when you attempt to log on to or add a database in DMS:

1. The database username or password is incorrect.

2. An error occurred while establishing the network connection.

3. Null, message from server: “Host ‘xxx.xxx.xxx.xxx’ is not allowed to connect to this MySQL server”.

4. Authentication failed. You are not authorized to log on to the Redis instance.

5. Packet for query is too large (xxx > xxx). You can change this value on the server by setting the max_allowed_packet’ variable.

6. Authentication failed. The database name, database username, or password is incorrect.

7. An error occurred while obtaining the instance information. Make sure you have entered the correct internal address of the RDS instance.

8. An error occurred while connecting DMS with MySQL database. Make sure you have entered the correct database endpoint and the network connection is available. Check the whitelist of the database and try again.

If the problem persists, click here to submit us a ticket.


  1. The database username or password is incorrect.

    The reasons are as follows:

    incorrect_user_psd

    • The username is the account name you have specified when creating the database in the RDS console. It is not your Alibaba Cloud account or RAM user account.

      user

    • The username is the one you have specified when creating the database through a CLI or GUI. For example, when creating a MySQL database, you may use commands such as, create user dmstest, or grant all on . to dmstest.

  2. An error occurred while establishing the network connection.

    The reasons are complex. We recommend that you submit us a ticket so that we can look into the issue thoroughly.

  3. Null, message from server: “Host ‘xxx.xxx.xxx.xxx’ is not allowed to connect to this MySQL server”.

    Reason: The user you have specified is not allowed to remotely log on to MySQL. For example, because root@localhost and root@127.0.0.1 have been configured in the mysql.user table, the root user can only log on to MySQL from the local machine.

    Fix one: Log on to MySQL from the local machine through a CLI or client tool, create a database account, and grant remote access permissions to this account.

    grant all privileges on . to ‘dms’@’%’ identified by ‘mypassword’;

    Fix two: Grant remote access permissions to the CIDR blocks of DMS.

    • (1) Classic network

      grant all privileges on . to ‘dms’@’120.55.177.0/24’ identified by ‘mypassword’;grant all privileges on . to ‘dms’@’121.43.18.0/24’ identified by ‘mypassword’;grant all privileges on . to ‘dms’@’10.153.176.106/24’ identified by ‘mypassword’;grant all privileges on . to ‘dms’@’10.137.42.136/24’ identified by ‘mypassword’;

    • (2) VPC

      grant all privileges on . to ‘dms’@’100.104.175.0/24’ identified by ‘mypassword’;grant all privileges on . to ‘dms’@’100.104.72.0/24’ identified by ‘mypassword’;grant all privileges on . to ‘dms’@’100.104.5.0/24’ identified by ‘mypassword’;grant all privileges on . to ‘dms’@’100.104.205.0/24’ identified by ‘mypassword’;

    Note: mypassword must be replaced with your password.

  4. Authentication failed. You are not authorized to log on to the Redis instance.

    Reason: The specified password is incorrect.

    Fix: Enter the password you have configured in requirepass in the redis.conf file.

    incorrect

  5. Packet for query is too large (xxx > xxx). You can change this value on the server by setting the max_allowed_packet variable.

    Reason: The response packet exceeds the maximum size specified by the max_allowed_packet parameter. In MySQL versions earlier than 5.6, the default maximum packet size is 1 MB. In MySQL 5.6 and later versions, the default maximum packet size is 4 MB.

    Fix: Set max_allowed_packet to a larger value.

    set global max_allowed_packet=134217728; #We recommend that you set this value to 128 MB.

  6. Authentication failed. The database name, database username, or password is incorrect.

    Reason: The MongoDB username you have entered is incorrect or the MongoDB schema is incorrect. The default schema is admin.

    Fix: Log on to the MongoDB console and click Basic Information > Accounts.

    MongoDB username: root (The root user has root permissions on the admin database.)

    m1

    m-2

  7. An error occurred while obtaining the instance information. Make sure you have entered the correct internal address of the RDS instance.

    Reasons:

    • (1) If the specified RDS instance has enabled high security mode, you can only use its internal address to log on to this instance.

    • (2) Make sure you have specified the correct instance endpoint.

  8. An error occurred while connecting DMS with MySQL database. Make sure you have entered the correct database endpoint and the network connection is available. Check the whitelist of the database and try again.

    The reasons are the same as the ones that caused the error while connecting DMS with SQL Server database. Make sure you have entered the correct database endpoint and the network connection is available. Check the whitelist of the database and try again.

    Reasons:

    • (1) MySQL databases deployed on ECS instances: You may have entered incorrect database IP address and port. The default port for MySQL is 3306. DMS supports accessing ECS instances using their internal and public IP addresses.

    • (2) MySQL databases deployed on ECS instances: The ECS security group has blocked DMS. Fix: Add the CIDR blocks of DMS to the security group. What are the CIDR blocks of DMS?

    • (3) MySQL databases deployed on ECS instances: The ECS firewalls, such as iptables, has blocked DMS. Fix: Add the CIDR blocks of DMS to the firewall whitelist. }What are the CIDR blocks of DMS?