user8210794
user8210794

Reputation:

MySQL dump with special charactered table name

I am trying to create a dump file with mysqldump.exe

I tried it like this:

C:\Program Files\MySQL\MySQL Workbench 8.0 CE>mysqldump --column-statistics=0 --single-transaction -p3306 -h10.10.10.10 -u username -p dbName > backup.sql
mysqldump: [Warning] Using a password on the command line interface can be insecure.
Enter password: ****************
mysqldump: Couldn't execute 'SHOW CREATE TABLE `PLZ_Stra├ƒen`': Table 'dbName.PLZ_Stra├â┼©en' doesn't exist (1146)

Because of the special character, the dump process fails, How can I solve this problem?

Upvotes: 0

Views: 483

Answers (2)

Rick James
Rick James

Reputation: 142238

ß, when interpreted as CHARACTER SET cp850 is hex c39f.

ß, which is presumably the character you wanted, when interpreted as CHARACTER SET utf8 (or utf8mb4) is hex c39f.

One hand is talking cp850; the other hand is utf8. Be consistent.

You seem to be using the Windows cmd. The command chcp 65001 provides utf8, but it needs a special charset installed.

Upvotes: 0

sachin kumara liyanage
sachin kumara liyanage

Reputation: 504

try to specify the character set with --default-character-set=utf8mb4 option when using mysqldump

mysqldump --default-character-set=utf8mb4 --column-statistics=0 --single-transaction -p3306 -h10.10.10.10 -u username -p dbName > backup.sql

or you can set any character set in mysql using that

Upvotes: 1

Related Questions