Home > OS >  AWS Aurora MySql Server
AWS Aurora MySql Server

Time:02-15

Created an AWS RDS Aurora server. Copied database from another active AWS RDS Instance. Created Aurora server can be accessed by a MySql client app. And can also delete table records, which will be the normal tasks eventually. The problem is I cannot access a website pointed to the Aurora server. Error message: Unable to connect to database server. The MySQL error was: Bad handshake. Settings.php already contains the correct username and password information.

Advance thank you for any assistance.

CodePudding user response:

  1. Ensure you are connecting with a public IP to the RDS service
  2. The RDS service port is exposed via the AWS service. Any firewall restrictions exist.
  3. Use telnet from your web server and ensure its able to reach your RDS server and connect to the particular port.

CodePudding user response:

This is likely because of the version mismatch of MySQL server that leads to the failed authentication. You are either:

  • Using an old version of MySQL on your client to connect to the server with a newer MySQL version.
  • Using a new version of MySQL on your client to connect to the server with an old MySQL version.

The newer MySQL versions might use a different protocol for the connection, thus causes the bad handshake issue when there’s a version mismatch. For example, using MySQL 8.0 on your local environment might not be able to connect to the server using MySQL 5.7.

To solve this problem, you should:

  • Check the versions of both your local and remote library/server, then install the same version on both environments.
  • Use a library that supports multiple versions of MySQL to avoid the risk of updating the server and potentially damaging data.
  • Related