Home > database >  Pt - file archiver tools two utf8mb4 table format, always find a encoding "utf8mb4" could
Pt - file archiver tools two utf8mb4 table format, always find a encoding "utf8mb4" could

Time:10-13

The source table: tc_utf8mb4
The target table: tc_arc
The library table character set: utf8mb4
Would you please tell me why the runtime will offer the following error?

 
Mysql> Show create table tc_utf8mb4 \ G
* * * * * * * * * * * * * * * * * * * * * * * * * * * 1 row * * * * * * * * * * * * * * * * * * * * * * * * * * *
Table: tc_utf8mb4
The 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 `),
The KEY ` idx_a ` (` a `)
) ENGINE=InnoDB AUTO_INCREMENT=43118 DEFAULT CHARSET=utf8mb4
1 row in the set (0.00 SEC)

Mysql> Show create table tc_arc \ G
* * * * * * * * * * * * * * * * * * * * * * * * * * * 1 row * * * * * * * * * * * * * * * * * * * * * * * * * * *
Table: tc_arc
The 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 `),
The KEY ` idx_a ` (` a `)
) ENGINE=InnoDB AUTO_INCREMENT=2001 DEFAULT CHARSET=utf8mb4
1 row in the set (0.00 SEC)

Mysql> Show variables like '% char %';
+ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - + -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- +
Value | | Variable_name |
+ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - + -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- +
| 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 the 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 "- the progress=500 - TXN - size=1000 - statistics - no - delete - ask - pass - limit=100 - bulk - insert - charset=utf8mb4
Enter the password:
Enter the password:
The TIME ELAPSED COUNT
T17:2020-05-06 and 0 0
Always find a encoding "utf8mb4" at/usr/bin/pt - archiver line 6665.
  • Related