Closed QuatorzeCommunications closed 1 year ago
Thanks for the report, @QuatorzeCommunications !
Since utf8mb4 was detected I would have expected that the mysqldump command to set --default-character-set='utf8mb4'
This is what should be happening:
What is DB_CHARSET
set for this WordPress install?
?
Sorry, I've openned issue in the wrong account, but the DB_CHARSET was set to UTF-8
Huh. Can you share the command you're using to export?
Hi,
I was only doing a standard : wp db export wp db import
I've tested it on another new installation and settings the same settings on another server and it didn't broke. For now we probably can close this issue. If I encounter this problem I'll try to find more information. (mysql.ini, version, etc.)
Thanks
Bug Report
Describe the current, buggy behavior
I have a wordpress installation with the database using utf8mb4 and when I export, it choose utf8 as default-charset-encoding instead of utf8mb4.
Debug (db): Final MySQL command: /usr/bin/env mysql --no-defaults --no-auto-rehash --batch --skip-column-names --host='localhost' --user='mydb_wp' --default-character-set='utf8' --execute='SELECT CCSA.character_set_name FROM information_schema.
TABLES
T, information_schema.COLLATION_CHARACTER_SET_APPLICABILITY
CCSA WHERE CCSA.collation_name = T.table_collation AND T.table_schema = '\''mydb_wp'\'' AND T.table_name LIKE '\''%_posts'\'';' (0.253s) Debug (db): Detected character set of the posts table: utf8mb4 utf8mb4 utf8mb4 utf8mb4 utf8mb4. (0.267s) Debug (db): Running initial shell command: /usr/bin/env mysqldump --no-defaults (0.267s) Debug (db): Associative arguments: {"result-file":"mydb_wp-2023-09-26-33c898d.sql"} (0.267s) Debug (db): Final MySQL command: /usr/bin/env mysqldump --no-defaults 'mydb_wp' --no-tablespaces --host='localhost' --user='mydb_wp' --default-character-set='utf8' --result-file='mydb_wp-2023-09-26-33c898d.sql' (0.267s)Describe how other contributors can replicate this bug
The issue command is wp db export --debug
Describe what you would expect as the correct outcome
Since utf8mb4 was detected I would have expected that the mysqldump command to set --default-character-set='utf8mb4'
Let us know what environment you are running this on
Provide a possible solution
Provide additional context/Screenshots