Changing Charset to utf8 for all the fields and tables in mysql
First backup the database. Sometimes character conversions can give unexpected results. 

I have had good success using these instructions:    

SELECT CONCAT('ALTER TABLE ',  table_name, ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;') INTO OUTFILE '/tmp/altertablesstatements.sql'
FROM
information_schema.tables
WHERE
    table_schema='&lt;database-name&gt;'
AND table_collation != 'utf8' 
GROUP BY table_name;


Add disable foreign_key_checks to first line of sql. 

echo 'SET foreign_key_checks = 0;' &gt;&gt; /tmp/altertablesstatements.sql


Import the changes

mysql DATABASE  &lt; /tmp/altertablesstatements.sql


Converting Columns

SELECT CONCAT(  'ALTER TABLE &lt;DATABASE&gt;.', table_name,  ' CHANGE ',COLUMN_NAME,'  ',COLUMN_NAME,' ',COLUMN_TYPE,' CHARACTER SET utf8 COLLATE utf8_general_ci',
IF(IS_NULLABLE='NO',' NOT NULL;',' NULL;')) INTO OUTFILE '/tmp/altercolumnsstatements.sql'
FROM information_schema.COLUMNS AS tb
WHERE TABLE_SCHEMA =  '&lt;DATABASE&gt;'
AND character_set_name != 'utf8';


Add disable foreign_key_checks to first line of sql. 

echo 'SET foreign_key_checks = 0;' &gt;&gt; /tmp/altercolumnsstatements.sql


Import the changes

mysql DATABASE  &lt; /tmp/altercolumnsstatements.sql


https://confluence.atlassian.com/jirakb/how-to-change-all-columns-and-tables-collation-to-utf8_bin-in-mysql-601456761.html