The full error I am seeing in Drush is:
Please convert all database tables to utf8mb4 prior to enabling it in settings.php. See the documentation on adding [warning] 4 byte UTF-8 support for more information. (Currently using Database 4 byte UTF-8 support Enabled, but database
tables need conversion)
I’m using the most current version of Drupal 7. I’ve converted all tables to utf8mb4_unicode_ci. I did so at first manually through the prompt, but then ran the updates again using phpMyAdmin on tables and fields (just to make sure, since Drush was still telling me “Please convert all database tables to utf8mb4 prior to enabling it in settings.php.”) All tables are set to InnoDB.
In the my.cnf file, I’ve ensured that I’ve got
[mysqld]
innodb_large_prefix=true
innodb_file_format=barracuda
innodb_file_per_table=true
Another site on the same server has utf8mb4 support enabled, and isn’t throwing the error. Both sites are using latest version of PHP 5.6.x. Drush version is 8.1.2. MySql is at the latest version of 5.5.x.
I’ve cleared all Drupal caches via drush cc all & restarted the MySQL server. The setup is under Ubuntu with Plesk.
Looking for thoughts on what I might have missed and why Drupal is asking me to convert tables that look like they’ve been converted (phpMyAdmin indeed shows the collation as utf8mb4_unicode_ci.)
2
Answers
Do you have collation and charset set in
settings.php
?Pleasse see https://www.drupal.org/forum/support/upgrading-drupal/2018-04-03/upgrade-to-758-database-utf-8-issues#comment-12968331. This message is not from a deep sql analysis but hinged on the value of the boolean variable
drupal_all_databases_are_utf8mb4
. This variable needs to be set toTRUE
after the tables have been converted whether you do it manually or by the recommended drush script (https://www.drupal.org/project/utf8mb4_convert) which (I think) will set it for you.-Bronius