If you want to change thee name of the new database to the old one after migration:.
In case you decide to upgrade the database in-place, you have to not only alter the database but also all existing tables to set the utf8mb4 encoding.
Migrate a current database to the new database created in a previous step.
Update MySql JDBC driver to version 5.1.47+, but not 8.x version (see Migrating to MySQL).Mysql> GRANT ALL PRIVILEGES ON crucible.* TO IDENTIFIED BY 'password' Mysql> CREATE DATABASE crucible CHARACTER SET utf8mb4 COLLATE utf8mb4_bin Mysql> SET GLOBAL default_storage_engine = 'InnoDB' This can be confirmed by opening the Properties panel of the Windows service used by MySQL and verifying the path from defaults-file attribute in the Path to executable field.Īdd the following lines to MySQL configuration file: In Windows environments the file is usually located at C:\ProgramData\MySQL\MySQL Server 5.7\my.ini.In Linux environments the file is usually located at /etc/my.cnf.Open the MySQL configuration file with a text editor. If you have an existing Fisheye / Crucible installation, make sure you shutdown the application gracefully and generate a database backup before moving on to the next step. If you use a version older than 4.7.0 perform an upgrade first (see Fisheye upgrade guide). Switch the character encoding to utf8mb4 and collation to utf8mb4_bin. Upgrade your MySQL database to version 5.7.7 or higher. MySQL JDBC driver 5.1.47 or newer, but not 8.x version (see Migrating to MySQL).MySQL database 5.7.7 or newer (see Supported platforms).This has been fixed.To migrate to 4-byte UTF8 character encoding, you will need the following: There was a little but within the convert_db.sh script which sometimes generated errors. See: Howto convert a MySQL/MariaDB database from any charset into UTF-8 – with Notepad++ in Windows Search for the keyword UTF on our Knowledge Base to find other articles about making your application ready for UTF-8 Convert database in Windows using Notepad++ In order for MySQL to properly allow UTF-8 connections you need to set the following settings to your MySQL configuration (usually /etc/mysql/my.cnf): Īlso you need to check that your online application / CMS is set to work on UTF-8 as well.
Mysql -u DB_USER -p PASSWORD -h DB_HOSTNAME -default-character-set=utf8 DB_NAME < sql_dump.sqlĬhanging the database MySQL properties to UTF-8 Re-Import the converted database-dump into your database like this:.The shell script will convert all the files in the directory mysqldump (currently there’s just the one sql_dump.sql file) into pure UTF-8.Reason: Our shell script checks the file extension and converts only files that end with. Please check the the file extension of the exported database file is. Mysqldump -opt -Q -u DB_USER -p PASSWORD -h DB_HOSTNAME DB_NAME > sql_dump.sql
For this article to be complete I’m gonna explain how to create a MySQL dump on the Linux command line: I prefer the MySQL-GUI tools for creating DB dump files.