Help Center> Relational Database Service> FAQs> Database Connection> How Do I Set the Encoding Format to Connect to the MySQL 8.0 Character Set?

How Do I Set the Encoding Format to Connect to the MySQL 8.0 Character Set?

Solution

  1. Set character_set_server to utf8 and collation_server to utf8_general_ci.
  2. If the client uses PHP 7.1.x, it will fail to connect to the utf8mb4 character set of MySQL 8.0. You are advised to use another PHP version.