When the program is using RDS MySQL to execute a query SQL statement, the following error is reported. How to troubleshoot?
SELECT command denied to user 'username '@' ip' for table 'user'
The database name is "fnb", and the program mosaic is hnb.us er, database name mosaic error is caused by the error.
Alibaba Cloud reminds you that:
- When you perform operations that have risks, such as modifying instances or data, check the disaster recovery and fault tolerance capabilities of the instances to ensure data security.
- Before you modify the configurations and data of instances including but not limited to ECS and RDS instances, we recommend that you create snapshots or enable RDS log backup.
- If you have authorized or submitted security information such as the logon account and password in the Alibaba Cloud Management console, we recommend that you modify such information in a timely manner.
- Test whether the RDS instance is abnormal. You can use the MySQL client to connect to the RDS and query the corresponding tables. If the query is normal, the RDS is normal.
- Use Wireshark to capture packets and capture actual requests sent by the local machine.
- In the Wireshark interface, Select capture > options on the input tab, select the network interface controller of the RDS instance, enter the output name, and then click start.
- Then, reproduce the problem. After the problem recurs, stop capturing the packet.
- Open the generated packet capture file, enter mysql in the display filter, filter the MySQL protocol, and find the package with the error.
- Click the right click, Select tracing stream > TCP flow.
- Check the SQL statements you sent to confirm that a database name splicing error occurred. Correct the database name and solve the problem.
- Check whether the program syntax and the syntax sent to the server are semantically correct.
- The SQL text to which the captured packets were analyzed.
- Apsaradb for MySQL