I really don't understand why mysql default charset is the swedish one.
When this have proved to cause in many cases many problems or issues.
I wish to make my mysql by default using utf8. And especially when creating new databases to set the collation as utf8.
Now I read an official mysql documentation but got more confused. Off course this happens because of my poor knowledge in databases.
But they suggest under mysqld section to add these lines in my.cnf
> skip-character-set-client-handshake
> collation_server=utf8_unicode_ci
> character_set_server=utf8
Anyone who has done such changes and wants to share his knowledge ?
Also if I enter these lines will there be any problem with the current databases set in different charsets ?
Mysql default characters set and collation
Mysql default characters set and collation
Hello IT.
Phone : Blah Blah ....
Have you tried turning it on and off again ?
Phone : Blah Blah ....
....
I'm sorry, are you from the Past ?!
http://www.youtube.com/watch?v=-E4fm4Wqego
Phone : Blah Blah ....
Have you tried turning it on and off again ?
Phone : Blah Blah ....
....
I'm sorry, are you from the Past ?!
http://www.youtube.com/watch?v=-E4fm4Wqego
Re: Mysql default characters set and collation
If you're running an older database or application it's likely that the tables were created using latin1_swedish_ci as your character set. There's nothing wrong with that but most web pages now use UTF8 which can cause database issues with some odd characters.
Changing the my.cnf setting changes your default character set but will NOT automatically convert your latin tables to UTF8. You will have to do that manually. I suggest using phpmyadmin to do this. Be sure to edit the collation for the table (under Operations) as well as all your fields. Remember that if you have character problems now you might want to dump your table as-is and reimport afterwards.
As a side note, unless you need international characters, utf8_general_ci is faster than utf8_unicode_ci
Changing the my.cnf setting changes your default character set but will NOT automatically convert your latin tables to UTF8. You will have to do that manually. I suggest using phpmyadmin to do this. Be sure to edit the collation for the table (under Operations) as well as all your fields. Remember that if you have character problems now you might want to dump your table as-is and reimport afterwards.
As a side note, unless you need international characters, utf8_general_ci is faster than utf8_unicode_ci
"Its not a mac. I run linux... I'm actually cool." - scott