Considerations for migrating from MySQL 5.7 to PolarDB for MySQL 8.0

Updated at:

PolarDB for MySQL 8.0 is fully compatible with MySQL 5.7. Migrating data does not cause data loss. However, you must check the compatibility between your MySQL client drivers and PolarDB for MySQL 8.0 before migration, and upgrade them if needed.

For migration procedures, see:

Client version requirements

Upgrade your MySQL client drivers to the following minimum versions before starting the migration. Older clients may not recognize MySQL 8.0 parameters and protocols.

Language Client Minimum version
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
Node.js MySQL Connector/Node.js 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

Known client compatibility issues

The following table lists known compatibility issues between specific client versions and MySQL 8.0. Resolve any issues that apply to your environment before proceeding with the migration.

Issue Affected client Database version Solution
Exception when connecting: the query_cache_size parameter cannot be identified. MySQL Connector/J 5.1.42 MySQL 8.0.13 Upgrade to mysql-connector-java 5.1.42 or later. For changelogs, see Connector/J Release Notes.
The COM_STMT_EXECUTE flag is invalid and COM_STMT_FETCH is not executed to retrieve the result set. The Python driver for MySQL 8.0 fails to return results, even though the same queries work in MySQL 5.6 and MySQL 5.7. MySQL Connector/J 2.2.9 MySQL 8.0.13 Install the Python driver for MySQL 8.0. For more information, see Python driver.
Executing SQL statements with kickout on a PolarDB for MySQL 8.0 cluster returns ERROR 1064 (42000): You have an error in your SQL syntax; — PolarDB for MySQL 8.0 Upgrade the PolarDB for MySQL 8.0 cluster to the latest revision. For more information, see Upgrade the cluster version.