Forum Moderators: coopster

Message Too Old, No Replies

Collation Issue in MySql

         

Musicarl

11:36 pm on Jul 13, 2005 (gmt 0)

10+ Year Member



When our server was set up, our host didn't set the collation and it defaulted to Swedish (apparently MySql is a Swedish company). We changed the server default to English (hp8_english_ci), so any new tables we create will have that collation, but we're stuck with a bunch of tables in latin1_swedish_ci.

I don't understand collation very well, but it sounds like this can cause problems. To correct this, can we simply change the collation on the tables in PhpMyAdmin, or do we need to create new tables and reimport the data?

arran

6:32 pm on Jul 14, 2005 (gmt 0)

10+ Year Member



musicarl,

You should just be able to run:

ALTER TABLE <table_name> CONVERT TO CHARACTER SET <charset_name>;

on the affected tables.

[dev.mysql.com ]

Musicarl

8:56 pm on Jul 14, 2005 (gmt 0)

10+ Year Member



Thanks for the advice arran. I'm concerned that the data itself will be effected by this change, but I can back up the database in case something goes screwy.