Drupal 7 utf8mb4 支持:"Please convert tables" 警告...转换表后
Drupal 7 utf8mb4 support: "Please convert tables" warning... after converting tables
我在 Drush 中看到的完整错误是:
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)
我使用的是最新版本的 Drupal 7。我已将所有表格转换为 utf8mb4_unicode_ci。我首先通过提示手动这样做,然后 运行 再次使用 phpMyAdmin 对表和字段进行更新(只是为了确保,因为 Drush 仍然告诉我 "Please convert all database tables to utf8mb4 prior to enabling it in settings.php.")所有表都设置为 InnoDB .
在 my.cnf 文件中,我确保我有
[mysqld]
innodb_large_prefix=true
innodb_file_format=barracuda
innodb_file_per_table=true
同一服务器上的另一个站点启用了 utf8mb4 支持,并且没有抛出错误。两个站点都使用最新版本的 PHP 5.6.x。 Drush 版本为 8.1.2。 MySql最新版本为5.5.x.
我已经通过 drush cc all 清除了所有 Drupal 缓存并重新启动了 MySQL 服务器。该设置在 Ubuntu 下与 Plesk 一起使用。
寻找关于我可能遗漏了什么的想法以及为什么 Drupal 要求我转换看起来已经转换过的表(phpMyAdmin 确实将排序规则显示为 utf8mb4_unicode_ci。)
您是否在 settings.php
中设置了排序规则和字符集?
$databases['default']['default'] = array(
'driver' => 'mysql',
'database' => 'databasename',
'username' => 'username',
'password' => 'password',
'host' => 'localhost',
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_general_ci',
);
请参阅 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 to TRUE
after the tables have been converted whether you do it manually or by the recommended drush script (https://www.drupal.org/project/utf8mb4_convert) 哪个(我认为)会为您设置。
-布罗纽斯
我在 Drush 中看到的完整错误是:
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)
我使用的是最新版本的 Drupal 7。我已将所有表格转换为 utf8mb4_unicode_ci。我首先通过提示手动这样做,然后 运行 再次使用 phpMyAdmin 对表和字段进行更新(只是为了确保,因为 Drush 仍然告诉我 "Please convert all database tables to utf8mb4 prior to enabling it in settings.php.")所有表都设置为 InnoDB .
在 my.cnf 文件中,我确保我有
[mysqld]
innodb_large_prefix=true
innodb_file_format=barracuda
innodb_file_per_table=true
同一服务器上的另一个站点启用了 utf8mb4 支持,并且没有抛出错误。两个站点都使用最新版本的 PHP 5.6.x。 Drush 版本为 8.1.2。 MySql最新版本为5.5.x.
我已经通过 drush cc all 清除了所有 Drupal 缓存并重新启动了 MySQL 服务器。该设置在 Ubuntu 下与 Plesk 一起使用。
寻找关于我可能遗漏了什么的想法以及为什么 Drupal 要求我转换看起来已经转换过的表(phpMyAdmin 确实将排序规则显示为 utf8mb4_unicode_ci。)
您是否在 settings.php
中设置了排序规则和字符集?
$databases['default']['default'] = array(
'driver' => 'mysql',
'database' => 'databasename',
'username' => 'username',
'password' => 'password',
'host' => 'localhost',
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_general_ci',
);
请参阅 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 to TRUE
after the tables have been converted whether you do it manually or by the recommended drush script (https://www.drupal.org/project/utf8mb4_convert) 哪个(我认为)会为您设置。
-布罗纽斯