tencent cloud

TencentDB for MySQL

動向とお知らせ
製品アップデート情報一覧
初心者ガイド
製品紹介
製品概要
製品の優位性
適用シナリオ
データベースのアーキテクチャ
タグ編集
製品機能リスト
データベースインスタンス
高可用性(マルチアベイラビリティゾーン)
地域とAvailability Zone
自社研究カーネル
TXSQLカーネル概要
機能系特性
パフォーマンス系特性
セキュリティ系特性
安定性系特性
TXRocksエンジン
購入ガイド
課金概要
購入方法
支払い更新の説明
支払い延滞の説明
返金説明
インスタンス調整の料金の説明
バックアップキャパシティ課金説明
クイックスタート
概要
MySQLインスタンスの作成
操作ガイド
使用制限
操作一覧
インスタンスの管理とメンテナンス
アップグレードインスタンス
拡張インスタンス
データベースプロキシ
データベース管理(DMC)
アカウント管理
パラメータ設定
バックアップとロールバック
データ移行
インターネットとセキュリティ
監視とアラーム
ログセンター
タグ
プラクティスチュートリアル
MySQL利用規約
アプリケーションの自動再接続機能のコンフィグレーション
MySQLマスターインスタンスパラメータの変更影響
MyISAMからInnoDBエンジンへの切り替え制限
TencentDB for MySQLのためのVPC作成
MySQLによるサービス負荷能力の向上
2地域3センターのディザスタリカバリ構築
リード・ライト分離によるTencentDB for MySQLパフォーマンスの拡張
DTSでInnoDBデータをRocksDBに移行します
LAMPスタック上のWebアプリケーションの構築
Drupalウエブサイトの構築
Python言語によるMySQL APIの使用
ホワイトペーパー
パフォーマンス白書
セキュリティ白書
トラブルシューティング
接続に関する問題
性能関連
インスタンスデータの同期遅延
大文字と小文字を区別しない設定に失敗しました
APIドキュメント
History
Introduction
API Category
Instance APIs
Making API Requests
Data Import APIs
Database Proxy APIs
Database Audit APIs
Security APIs
Task APIs
Backup APIs
Account APIs
Rollback APIs
Parameter APIs
Database APIs
Monitoring APIs
Log-related API
Data Types
Error Codes
よくある質問
課金関連
ロールバック関連の問題
接続とログインに関する問題
パラメータを変更
アップグレード関連の問題
アカウント権限
性能メモリ
運営する
データ移行
機能特徴
コンソール関連
ログ関連
API 2.0切り替え 3.0ガイド
Service Agreement
Service Level Agreement
Terms of Service
汎用参考
標準と認証
お問い合わせ
用語集
ドキュメントTencentDB for MySQL

Methods and Instructions for Upgrading from MySQL 5.6 to MySQL 5.7

フォーカスモード
フォントサイズ
最終更新日: 2025-10-27 18:01:40
TencentDB for MySQL provides two main methods for upgrading your database version: direct upgrade via the console and indirect upgrade via the Data Transfer Service (DTS). This document uses the upgrade from MySQL 5.6 to MySQL 5.7 as an example to introduce these two database version upgrade methods and their implementation.

Version Upgrade Prerequisites

The syntax create table … as select … is not supported.
Source-replica synchronization for TencentDB for MySQL 5.6 and 5.7 is implemented based on GTID and by default only supports the InnoDB engine.
If the number of tables in a single instance exceeds 300,000, it may cause the upgrade to fail and also affect database monitoring. It is recommended to reasonably standardize and control the number of tables per single instance to no more than 300,000.

Upgrade Method Description

Direct upgrade via console: If conditions (the aforementioned Version Upgrade Prerequisites) are met, you can directly operate in the console to upgrade the database version of the existing instance to a higher version. This method is usually more convenient. It is recommended to perform a compatibility check before upgrading and to perform the upgrade during off-peak business hours.
Indirect upgrade via DTS: If your instance does not meet the conditions for direct upgrade or it is not convenient to perform a direct upgrade, you can purchase a new MySQL instance with a higher version, and use DTS to migrate data of the original instance to the new one. After the data is verified, you can switch your business to the new instance and release the original instance. This method offers high flexibility but requires additional data migration and verification work.

Must-Knows

The database version cannot be downgraded.
Instances with single-node (Cloud Disk) or cluster edition (Cloud Disk) architecture do not support upgrading the database version.
The primary instance, its associated read-only instances, and disaster recovery instances will be upgraded to the target database version simultaneously. You can upgrade the database version of the primary instance to associate the upgrade of read-only instances and disaster recovery instances under it.
Upgrading TencentDB for MySQL to a new version involves data migration and typically takes a considerable amount of time. During this period, your business will remain unaffected and accessible.
When the version upgrade is completed, an instance switchover will be involved (there will be a second-level database disconnection). It is recommended that user applications possess an automatic reconnection feature and that the switchover is performed during instance maintenance time. For details, see Setting Instance Maintenance Time.

Method One: Direct Upgrade via the Console

Preparations

Learn about the differences and advantages between old and new versions. For differences in supported features, see Appendix 1: Feature Differences Between MySQL 5.6 and 5.7. For upgrade advantages, see Appendix 2: Advantages of Upgrading from MySQL 5.6 to 5.7.

Understanding the Upgrade Process and Impact

Database versions do not support cross-version upgrades, and by default, upgrades to the latest minor version within the target major version. For example, MySQL 5.6 cannot be directly upgraded to MySQL 8.0. You need to first upgrade it to MySQL 5.7, then to MySQL 8.0.
The minimum database version for instances with cluster edition (Cloud Disk) architecture is MySQL 5.7. Therefore, upgrading from MySQL 5.6 to MySQL 5.7 is not involved.

Checking Instance and Database Configuration

Check custom functions and ensure no reserved keywords are used within the functions. For reserved keywords, see MySQL Official Keywords and Reserved Words.
Check whether there is a successful record of a full data backup in the past week, and perform a full data backup if necessary.
Before upgrading, ensure that sufficient storage space is reserved.
Increase the local log retention period. For specific operations, see Configuring Local Binlog Retention Policy.
To ensure the stability and performance of MySQL in the new database version, after completing the database version upgrade, TencentDB for MySQL no longer supports modifying certain parameters from the lower version that are deprecated in the higher version. Before upgrading the database version, it is recommended to back up modification records of related parameters for subsequent operations and auditing.

Pre-upgrade Testing and Simulation

It is recommended to create an instance with a higher database version to perform syntax testing before upgrading, to avoid situations where syntax or features from the lower database version are not supported after upgrading to the higher version.
It is recommended to clone the instance before upgrading. First, use the cloned instance for upgrade testing, and after confirming all features are normal, upgrade the original instance.

Post-upgrade Must-Knows

The database version cannot be downgraded. If you need to use the upgrade rollback capability, submit a ticket to apply.

Operation Steps

Method Two: Indirect Upgrade via DTS

For a MySQL 5.6 instance that does not meet the conditions for a direct upgrade, or if it is not convenient to perform a direct upgrade, you can create an instance with a database version of MySQL 5.7 and migrate the data from the original instance to the new instance via DTS. After performing compatibility testing on the new instance and monitoring it for a period of time to confirm its normal operation, you can choose to destroy the original instance and use the new instance, thereby achieving an indirect upgrade of the database version.

Operation Steps

1. Create a MySQL 5.7 instance. For the method, see Creating MySQL Instance.
2. Migrate data to the MySQL 5.7 instance created above via DTS. For details, see Migration from MySQL to TencentDB for MySQL.
3. Log in to the Database Management Center (DMC) console, and check whether the data is normal. For the login method, see DMC Management.
4. Destroy the original instance. For the method, see Terminating Instance.

Appendix 1: Feature Differences Between MySQL 5.6 and MySQL 5.7

The following table lists only partial feature differences between MySQL 5.7 and MySQL 5.6. For differences between other versions, see MySQL Official Release Notes.
Feature
MySQL 5.6
MySQL 5.7
Automatically killing idle transactions
Supported
Supported
Parallel replication
Supported
Supported
Dynamic thread pool
Not supported
Supported
NOWAIT syntax
Not supported
Supported
Returning
Not supported
Supported
Column compression
Not supported
Supported
Flashback query
Not supported
Supported
Large transaction replication
Supported
Supported
Support for using fdatasync
Not supported
Supported
Auto-increment column persistence
Not supported
Supported
InnoDB buffer pool parallel initialization
Supported
Supported
FAST DDL
Not supported
Supported
Invisible Index
Not supported
Supported
CATS transaction scheduling
Not supported
Supported
Computation pushdown
Not supported
Supported
Transparent data encryption
Not supported
Supported
Instant column addition
Not supported
Supported
Asynchronous large table deletion
Supported
Supported
Hotspot update
Not supported
Supported
SQL throttling
Supported
Supported
LibraDB
Not supported
Supported

Appendix 2: Advantages of Upgrading from MySQL 5.6 to MySQL 5.7

Add the transparent data encryption feature to improve database security.
Support hotspot update merge optimization to enhance hotspot update performance.
Support DDL progress display. During DDL operation, execute the show detail processlist command to view the progress.
Add the default table encryption feature.
Support flashback query persistence.
Support the nonblocking DDL feature.
Support the validate password plugin.
Support storing historical deadlock information.
Support the InnoDB auto-increment column persistence feature.

ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック