源表:tc_utf8mb4
目標表:tc_arc
庫表字符集:utf8mb4
請問運行時為什么會報下面的錯誤?
mysql> show create table tc_utf8mb4\G
*************************** 1. row ***************************
Table: tc_utf8mb4
Create Table: CREATE TABLE `tc_utf8mb4` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
`c` varchar(10) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `idx_a` (`a`)
) ENGINE=InnoDB AUTO_INCREMENT=43118 DEFAULT CHARSET=utf8mb4
1 row in set (0.00 sec)
mysql> show create table tc_arc\G
*************************** 1. row ***************************
Table: tc_arc
Create Table: CREATE TABLE `tc_arc` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
`c` varchar(10) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `idx_a` (`a`)
) ENGINE=InnoDB AUTO_INCREMENT=2001 DEFAULT CHARSET=utf8mb4
1 row in set (0.00 sec)
mysql> show variables like '%char%';
+--------------------------------------+----------------------------+
| Variable_name | Value |
+--------------------------------------+----------------------------+
| character_set_client | utf8mb4 |
| character_set_connection | utf8mb4 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8mb4 |
| character_set_server | utf8mb4 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
| validate_password_special_char_count | 1 |
+--------------------------------------+----------------------------+
9 rows in set (0.00 sec)
[root@tx19 ~]# pt-archiver --source h=192.168.20.100,P=3306,u=root,D=test,t=tc_utf8mb4,A=utf8mb4 --dest h=192.168.20.100,P=3306,u=root,D=test,t=tc_arc,A=utf8mb4 --where "id<=2000" --progress=500 --txn-size=1000 --statistics --no-delete --ask-pass --limit=100 --bulk-insert --charset=utf8mb4
Enter password:
Enter password:
TIME ELAPSED COUNT
2020-05-06T17:37:15 0 0
Cannot find encoding "utf8mb4" at /usr/bin/pt-archiver line 6665.
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/19859.html
標籤:MySQL
上一篇:SQL資料庫,在表里插入資料
下一篇:新手求教,MySQL5.7安裝Apply Server Configuration 卡在Adjusting Windows service
