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'"

Open
#935 1 comment 0 reactions 0 assignees View on GitHub

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 :

Image

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.