Unix Technical Forum

Global change of database collation

This is a discussion on Global change of database collation within the MySQL General forum forums, part of the MySQL category; --> MySQL Users, I know from the manual that I can change the collation set of a table with the ...


Go Back   Unix Technical Forum > Database Server Software > MySQL > MySQL General forum

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 05:48 AM
Dave M G
 
Posts: n/a
Default Global change of database collation

MySQL Users,

I know from the manual that I can change the collation set of a table
with the following command:

ALTER TABLE `mytable` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci

And that I can do this to alter a column of a table to change its collation:

ALTER TABLE `mytable` CHANGE `column` `column` CHARACTER SET utf8
COLLATE utf8_unicode_ci

But what I can't seem to find is the ability to change more than one at
a time.

Neither of these work:

ALTER TABLE * DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci
ALTER TABLE * CHANGE * CHARACTER SET utf8 COLLATE utf8_unicode_ci WHERE
COLLATE=latin_swedish_ci

Is there no way to make every instance of "latin_swedish_ci" in a
database, both on the table and the column level, turn to "utf8_unicode_ci"?

I have a huge database to work with, and the prospect of doing this by
hand is rather unappealing.

Any advice or information would be much appreciated.

--
Dave M G
Ubuntu 6.10 Edgy Eft
Kernel 2.6.17.7
Pentium D Dual Core Processor
PHP 5, MySQL 5, Apache 2



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:16 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com