As you have already created the database you will have a slightly larger job, do the following:
Change the database encoding:
ALTER DATABASE <nome_do_banco> CHARACTER SET utf8 COLLATE utf8_unicode_ci;
Change the encoding of tables:
ALTER TABLE <nome_da_tabela> CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
Change the encoding of the columns:
ALTER TABLE <nome_da_tabela> MODIFY <nome_da_coluna> <VARCHAR(255)> CHARACTER SET utf8 COLLATE utf8_unicode_ci;
Or you can run these queries down to make it easier for you to work around the bank.
SELECT DISTINCT concat('ALTER DATABASE ', TABLE_SCHEMA, ' CHARACTER SET utf8 COLLATE utf8_unicode_ci;')
from information_schema.tables
where TABLE_SCHEMA like 'database_name';
-
SELECT concat('ALTER TABLE ', TABLE_SCHEMA, '.', table_name, ' CHARACTER SET utf8 COLLATE utf8_unicode_ci;')
from information_schema.tables
where TABLE_SCHEMA like 'database_name';
-
SELECT concat('ALTER TABLE ', t1.TABLE_SCHEMA, '.', t1.table_name, ' MODIFY ', t1.column_name, ' ', t1.data_type , '(' , CHARACTER_MAXIMUM_LENGTH , ')' , ' CHARACTER SET utf8 COLLATE utf8_unicode_ci;')
from information_schema.columns t1
where t1.TABLE_SCHEMA like 'database_name' and CHARACTER_SET_NAME = ‘old_charset_name';