PolarDB for MySQL 8.0 is fully compatible with MySQL 5.7. You can migrate data from MySQL 5.7 to PolarDB for MySQL 8.0 without data loss. However, you must use MySQL clients that are compatible with PolarDB for MySQL 8.0.

Note Kickout is a reserved keyword of PolarDB MySQL 8.0. Therefore, if you have used this keyword as the object name (such as table name, field name, stored procedure name, etc.) on MySQL 5.7 or MySQL 8.0, before migrating the data to PolarDB MySQL 8.0, please change the object name to avoid using this keyword. Otherwise, a grammatical error with the error code 1064 will appear during migration.

For more information about how to migrate data from MySQL 5.7 to PolarDB for MySQL 8.0, see the following topics:

Client versions

You must upgrade your MySQL client to one of the following versions:

Note If you cannot upgrade your MySQL 5.7 client to support PolarDB for MySQL 8.0, you can choose to migrate the data to PolarDB for MySQL 5.6. Before you use PolarDB for MySQL 5.6, the following conditions must be met:
  • JSON data is not used.
  • You have run performance tests.
  • Java: MySQL Connector/J 8.0 or later.
  • ODBC: MySQL Connector/ODBC 8.0 or later.
  • CPP: MySQL Connector/CPP 8.0 or later.
  • . NET: MySQL Connector/NET 8.0 or later.
  • Nodejs: MySQL Connector/Nodejs 8.0 or later.
  • Python: MySQL Connector/Python 8.0 or later.
  • Python: mysql-connector-Python 8.0.5 or later.
  • Golang: go-sql-driver/mysql 1.4.0 or later.
  • PHP: mysqlnd 7.4 or later.
  • C/CPP: libmysqlclient 8.0 or later.

Common client issues

    • Description: An error occurred while connecting to the MySQL database. The query_cache_size parameter cannot be identified.
    • Driver version: mysql-connector-java:5.1.42
    • Database version: mysql 8.0.13
    • Solution: You can use mysql-connector-java:5.1.42 or later versions. For more information about the version updates, see Changes in MySQL Connector/J 5.1.43.
    • Description: The flag of COM_STMT_EXECUTE is invalid and the com_stmt_fetch statement is not executed. As a result, the mysql python driver for MySQL 8.0 may fail to retrieve the required results. However, the mysql python driver for MySQL 5.6 and 5.7 can return the required results.
    • Driver version: mysql-connector-2.2.9.
    • Database version: mysql 8.0.13.
    • Solution: You can install Python driver 8.0. To download Python driver 8.0.