# JIRA's XML backup utility to backup JIRA database in XML format
# develop a Perl script (mysql_latin1_2_utf8.pl) to use ALTER TABLE/DATABASE SQL statements to convert data from latin1 to utf8
# automatically convert all text columns to utf8
ALTER TABLE <table_name> CONVERT TO CHARACTER SET utf8;# for any future tables created in this database will use utf8 by default
ALTER DATABASE <database_name> CHARACTER SET utf8;# mysql_latin1_2_utf8.pl usage
NAMEmysql_latin1_2_utf8.plSYNOPSIS
DESCRIPTION
This script is going to convert MySQL database characte set from latin1 to utf8.
VERSION
Version 1.0
USAGE
perl mysql_latin1_2_utf8.pl --mysql_dbname "[mysql_dbname]" --mysql_username "[mysql_username]" --mysql_password "[mysql_password]" --mysql_host "[mysql_host]"
· --mysql_dbname "[mysql_dbname]" - MySQL dbname. Required
· --mysql_username "[mysql_username]" - MySQL username. Required
· --mysql_password "[mysql_password]" - MySQL password. Option
· --mysql_host "[mysql_host]" - MySQL host. Required
EXAMPLE
1. convert MySQL database characte set from latin1 to utf8.
perl /tmp/mysql_latin1_2_utf8.pl --mysql_dbname "latin1jiradb" --mysql_username "root" --mysql_password "********" --mysql_host "linux64-jira-server"