Skip to main content

#1273 - Unknown collation: 'utf8mb4_0900_ai_ci'

Recently i had to import a db from production to localhost, so i thought this would be an easy task (Murphy's law, it never is easy when you want it). The db.gzip file was ok (no tables corruption or anything else) but it looked like my local version of Mysql (Server version: 5.7.26 MySQL Community Server (GPL)) was using a different utf8mb4 collation from the production live server (Server version: 8.0.20-0ubuntu0.20.04.1 (Ubuntu)). So the server collation was using utf8mb4_0900_ai_ci vs the local collation utf8mb4_unicode_ci. Turned out all i had to do in order not to upgrade mysql server was this macOS terminal command.

sed -i '' 's/utf8mb4_0900_ai_ci/utf8mb4_unicode_ci/g' db.sql 

 

utf8mb4

Latest Articles

Using drupal/core-composer-scaffold to prevent rewriting .htaccess or robots.txt file admin_pixelthi… Sun, 12/01/2024 - 16:49 Using drupal/core-composer-scaffold to prevent rewriting .htaccess or robots.txt file

Using drupal/core-composer-scaffold to prevent rewriting .htaccess or robots.txt file

composer
Controlling ckeditor styling options with hook_editor_js_settings_alter admin_pixelthi… Thu, 05/16/2024 - 10:49 Controlling ckeditor styling options with hook_editor_js_settings_alter

Controlling ckeditor styling options with hook_editor_js_settings_alter

php hook hook_editor_js_settings_alter hook_field_widget_single_[WIDGET_TYPE]_form_alter
Upgrading Drupal 9 Modules for Drupal 10: A Simple Guide admin_pixelthi… Tue, 09/05/2023 - 14:18 Upgrading Drupal 9 Modules for Drupal 10: A Simple Guide

Upgrading Drupal 9 Modules for Drupal 10: A Simple Guide

composer drupal9 drupal10