The error message 'Unknown database 'cmd_online'' suggests that the database named 'cmd_online' does not exist on the MySQL server at the specified IP address and port. It could be that the database has not been created yet, or that the IP address or port is incorrect. Double-check that the MySQL server is running and that the database has been created with the correct name and credentials.

Here are some steps to troubleshoot this issue:

  1. Verify Database Existence: Ensure that the database 'cmd_online' has been created on the MySQL server. You can use a MySQL client tool like MySQL Workbench or command-line tools to check for existing databases. If the database doesn't exist, you'll need to create it using the appropriate commands.

  2. Check Server Details: Make sure the IP address and port specified in the connection string (jdbc:mysql://121.199.69.248:3306/cmd_online) are correct. Double-check that the MySQL server is running on the specified IP address and port. You can verify this by attempting to connect to the server using a MySQL client tool.

  3. Confirm Credentials: Verify the username ('root') and password ('YWRtaW42NjY=mysql') used to establish the connection. Make sure they are correct and have sufficient permissions to access the database. If you're using an encrypted password, ensure the correct decryption mechanism is being applied.

  4. Review Firewall Settings: If the server is behind a firewall, make sure that the necessary ports are open to allow database connections. This might include ports 3306 for MySQL traffic. Check your firewall configuration and any network security settings to ensure proper access is granted.

If you've checked these points and the issue persists, consider checking for any typos in the code, reviewing the MySQL server logs for error messages, or contacting your database administrator for further assistance.


原文地址: http://www.cveoy.top/t/topic/oCK1 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录