Ghost 4.1.0 errored during boot

All tables in my ghost_production database have the same collation (utf8mb4_general_ci).

Did you recently upgrade to a newer version of MySQL? If so that might explain the issue - MySQL v8 changes the default table collation to something other than utf8mb4_general_ci, so any new tables that Ghost attempts to create as part of v4 migrations will be created with the new collation.

You should be able to check your database’s default charset/collation using the following query:

SELECT SCHEMA_NAME,
DEFAULT_CHARACTER_SET_NAME,
DEFAULT_COLLATION_NAME
FROM INFORMATION_SCHEMA.SCHEMATA
WHERE SCHEMA_NAME='ghost_production';

If the default charset/default collation are anything other than utf8mb4 and utf8mb4_general_ci, respectively, you’ll need to run the following command to update the defaults:

ALTER DATABASE `ghost_production`
DEFAULT CHARACTER SET utf8mb4
DEFAULT COLLATE utf8mb4_general_ci;
3 Likes