UTF8MB4 Convert

transfer ok

1. greencom.tw

https://www.drupal.org/project/utf8mb4_convert

my.cnf settings:

[mysqld]
 innodb_large_prefix=true
 innodb_file_format=barracuda
 innodb_file_per_table=true

These settings are available as of MySQL 5.5.14, and are defaults in MySQL 5.7.7 and up. After editing my.cnf don't forget to restart the mysql server!

Installation

  • Run drush @none dl utf8mb4_convert-7.x and drush will download it into your .drush folder. (Alternately, you can obtain the package another way and copy the folder into .drush yourself.)
  • Clear the Drush cache with "drush cc drush".

 

Usage

  1. Make backups of your databases.
  2. Comment out any MySQL databases listed in settings.php that you do not want to convert.
  3. Put your site into maintenance mode: drush vset maintenance_mode 1
  4. Run drush utf8mb4-convert-databases
  5. Enable utf8mb4 in your settings.php:
    $databases['default']['default'] = array(
      'driver' => 'mysql',
      'database' => 'databasename',
      'username' => 'username',
      'password' => 'password',
      'host' => 'localhost',
      'charset' => 'utf8mb4',
      'collation' => 'utf8mb4_general_ci',
    );
    
  6. Take your site out of maintenance mode: drush vset maintenance_mode 0

 

Tags