How Do You Troubleshoot the Error “ERROR 1273 (HY000): Unknown collation: ‘utf8mb4_general_ci6′”?

Problem scenario
You are trying to follow the Drupal installation instructions.  You run this command from a mysql prompt:

mysql> CREATE DATABASE drupaldb CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci6;

But you get this error: "ERROR 1273 (HY000): Unknown collation: 'utf8mb4_general_ci6'"

What should you do?

Solution
To find the potential collations that you can run (based on your SQL database), run this command:  

SHOW COLLATION;

From the results above, change the "utf8mb4_general_ci6" value in the CREATE DATABASE command.  Then run a new version of the CREATE DATABASE command:

CREATE DATABASE drupaldb CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

Leave a comment

Your email address will not be published. Required fields are marked *