新版mysqldump預設會使用UTF8,不用指定default-character-set 備份資料庫 #mysqldump -h localhost -usqmc sqmctest > sqmctest.sql; [root@Srv ECC-SQMC]# mysql-usqmc -p > drop database sqmc; > create database sqmc; > grant .... [root@Srv ECC-SQMC]# mysqldump -usqmc -p sqmc Enter password: -- MySQL dump 10.13 Distrib 8.0.21, for Linux (x86_64) -- -- Host: localhost Database: sqmc -- ------------------------------------------------------ -- Server version 8.0.21 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!50503 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL...