Pantheon Community

Converting D7 Database to UTF8MB4

Following the steps outlined here, converted all tables in an existing D7 (v7.69) installation. Specifically:

  1. Altered all pantheon database tables. All tables show Encoding as ‘UTF-8 Unicode (utf8mb4), Collation as ‘uft8mb4_general_ci’. I also had to alter Row Format from Compressed to Dynamic.
  2. Added in settings.php: $databases[‘default’][‘default’][‘charset’] = ‘utf8mb4′;
    $databases[‘default’][‘default’][‘collation’] = ‘utf8mb4_general_ci’;
  3. Added the following drupal variable: ‘drupal_all_databases_are_utf8mb4′, value=‘b:1;

However, the status report and trying to run a Drupal database update at /update.php gives the following error:

“Database 4 byte UTF-8 support Not supported. 4 byte UTF-8 for mysql is activated, but not supported on your system. Please turn this off in settings.php, or ensure that all database-related requirements are met…”

My understanding is all database-related requirements are automatically met in Pantheon (e.g. my.cnf settings, MySQL driver and server). Can anyone make a suggestion on how to troubleshoot further?

Thank you.

Resolved: Table ‘drupal_utf8mb4_test’ was already in the database. After dropping table, status report shows 4 byte enabled (no errors). Reference: