List:General Discussion« Previous MessageNext Message »
From:Gleb Paharenko Date:September 6 2005 8:32am
Subject:Re: How concerned should I be about Collation?
View as plain text  
Hello.

There is no statement which is able to change the collation
and character set information in all tables at once. For single
table use an ALTER TABLE statement. See:
  http://dev.mysql.com/doc/mysql/en/alter-table.html


Dave <davemg@stripped> wrote:
> MySQL General List,
> 
>    Server specifications:
>    MySQL 4.1.3-beta, phpMyAdmin 2.5.7-pl1, PHP 4.3.8
>   
>    My specifications:
>    MySQL beginner, PHP intermediate, HTML and CSS advanced.
> 
>    The situation:
>    I have a database of users for my web site, in which all the text 
> data that is inserted and obtained from MySQL via PHP is in UTF-8 
> encoding. My web host helped me install MySQL 4.1 and phpMyAdmin 2.5.7 
> because, from what I can see, they are a little more user friendly in 
> how they let a user view and manipulate UTF-8 text.
> 
>    I had a number of tables with user data that I created myself, and I 
> was sure to specify that for each, the "Collation" was in "utf_general_ci".
>   
>    Recently, I decided to add a forum for my users, using the PHP based 
> "Simple Machines Forum" available here:
>    http://www.simplemachines.org/
> 
>    This added a bunch of new tables, in which the "Collation" was the 
> default setting of "latin1_swedish_ci".
> 
>    My next step is to take the user data I already have collected, and 
> merge it with the new forum users table, so that my existing users can 
> start use of the forum without having to re-enter all their information.
> 
>    The Questions:
>    Before I start merging tables, I want to ensure that the whole 
> database is consistent in it's use of character sets. This means I want 
> to convert all the new tables to use "utf_general_ci" for collation, 
> storage, and any other charset related setting.
>    What MySQL command can I use to globally convert all the tables and 
> field collation settings in the database to "utf_general_ci"?
>    Are there other charset related settings that I should be concerned 
> about? If so, how would I configure them to keep the database consistent.
>   
>    What I've done so far:
>    I did a bit of research on what collation is by going to this web site:
>    http://grace.evergreen.edu/mysqlDoc/manual_Charset.html
>    But further searching via Google did not turn up any instructions 
> for specific commands to make the changes I am looking for.
> 
>    Any assistance is much appreciated. Thank you.
> 
> Dave
> 


-- 
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
How concerned should I be about Collation?Dave6 Sep
  • Re: How concerned should I be about Collation?Gleb Paharenko6 Sep
    • Re: How concerned should I be about Collation?Alexandre Quessy7 Sep