magento / magento/data-migration-tool
Facing Sql state error on data migration cmd "SQLSTATE[42000]: Syntax error or access violation: 1115 Unknown character set: 'utf8mb4'"
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 339
- Forks
- 195
- PR merge metrics
- No merged PRs in 30d
Description
Steps to reproduce : On running Below command in Magento 2.4.8
- Run ./bin/magento migrate:data -r -a app/code/Magento/Migration/etc/opensource-to-opensource/1.9.2.4/config.xml
- Getting Below Error :
SQLSTATE[42000]: Syntax error or access violation: 1115 Unknown character set: 'utf8mb4', query was: CREATE TABLE IF NOT EXISTS `m2_cl_catalog_compare_item` (
`catalog_compare_item_id` int NOT NULL COMMENT 'Catalog_compare_item_id' ,
`operation` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'Operation',
`processed` bool NOT NULL default 0 COMMENT 'Processed' ,
PRIMARY KEY (`catalog_compare_item_id`)
) COMMENT='m2_cl_catalog_compare_item' ENGINE=INNODB charset=utf8mb4 COLLATE=utf8mb4_general_ci
Solution I tried.
- Added the content below on map.xml file under document rule section of source as well as destination.
`
m2_cl_catalog_compare_item
catalog_compare_item
`
- Manually created table in db directly using same create query.
Still getting same error.
Can you please help me with this migration.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with ./bin/magento migrate:data -r -a app/code/Magento/Migration/etc/opensource-to-opensource/1.9.2.4/config.xml, then inspect the generated CREATE TABLE statement for m2_cl_catalog_compare_item. Review the source and destination map.xml document rules and database settings. Done means the migration completes without the utf8mb4 error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql, php
- Domain
- database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100