List:General Discussion« Previous MessageNext Message »
From:Gleb Paharenko Date:July 7 2005 9:47am
Subject:Re: change collation on all existing databases, tables and columns
View as plain text  
Hello.

If you don't want to write a script (I think it shouldn't be difficult anyway) 
for this purposes, you could use mysqldump with
--skip-create-options or --compatible=no_table_options,no_field_options.
Using this you could get the dump of you database and table definitions
without information about collation. Then just import the dump and all
tables will have the same collation. However, you can loose some
important table properties.


Florian Effenberger <floeff@stripped> wrote:
> Hello there,
> 
> I run MySQL 4.1.12 and have some databases with the default collation of
> latin1_swedish_ci. I have edited the my.cnf file to read
> 
> default-collation = latin1_german1_ci
> 
> Now I would like to change the collation on all existing databases,
> tables and columns to have the latin1_german1_ci collation, as the
> my.cnf entry only works for new entries. Is there an easy command or
> tool to achieve that? I don't want to send the appropriate command
> mentioning every single database, table and column, but rather look for
> a FOR loop or a wildcard.
> 
> Thanks
> Florian
> 


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   Gleb.Paharenko@stripped
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
       <___/   www.mysql.com



Thread
change collation on all existing databases, tables and columnsFlorian Effenberger7 Jul
  • Re: change collation on all existing databases, tables and columnsGleb Paharenko7 Jul