Reputation: 77
Mysql server collation is utf8_general_ci in my.cnf
I am using utf8_general_ci collation for database, now i have created few tables with utf8_unicode_ci collation in same database.
Now i would like to use utf8_unicode_ci for server/database/tables/fields. In order to do that first i need to change collation for server to utf8_unicode_ci then for database, tables and fields.
My question is i already have data in tables stored using utf8_general_ci, can i just keep as it is without doing anything to data Or do i need to do any kind of conversion.
Other thing is, as you can see server level collation is utf8_general_ci but at table and field level is utf8_unicode_ci, so with my current setup when i store and retrieve data from these tables what collation mysql use?
Thank you.
Upvotes: 3
Views: 644
Reputation: 158007
"Server level" collation means nothing.
Server and database level charset (and collation) serve as mere default values for the table (and database) creation.
It's only table and field level collation that matters.
if i already have data in tables stored using utf8_general_ci, can i just keep as it is
Yes. You can have tables with any charset in your database.
Upvotes: 1