Results 1 to 2 of 2
  1. #1
    Join Date
    May 2007
    Posts
    85

    Question MySQL default charset - collation

    Hi guys,

    That's what I have now:

    mysql> SHOW VARIABLES LIKE 'character_set%';
    +--------------------------+----------------------------+
    | Variable_name | Value |
    +--------------------------+----------------------------+
    | character_set_client | utf8 |
    | character_set_connection | utf8 |
    | character_set_database | latin1 |
    | character_set_filesystem | binary |
    | character_set_results | utf8 |
    | character_set_server | latin1 |
    | character_set_system | utf8 |
    | character_sets_dir | /usr/share/mysql/charsets/ |
    +--------------------------+----------------------------+
    8 rows in set (0.00 sec)


    I wish to change "latin1" to "utf8", so as result I should have the utf8 everywhere.

    How can I do this?


    Thanks a lot

  2. #2
    Join Date
    Jan 2011
    Location
    Canada
    Posts
    938
    From stack overflow.

    http://stackoverflow.com/questions/3...utf8-in-my-cnf

    my.cnf

    [client]
    default-character-set=utf8

    [mysql]
    default-character-set=utf8


    [mysqld]
    default-character-set = utf8
    collation-server = utf8_unicode_ci
    init-connect='SET NAMES utf8'
    character-set-server = utf8
    and to change existing tables

    ALTER TABLE Table CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci

Similar Threads

  1. Default charset does not work
    By lazat in forum Hosting Security and Technology
    Replies: 4
    Last Post: 08-26-2010, 08:39 AM
  2. MySQL Collation?
    By ChrisF79 in forum Programming Discussion
    Replies: 5
    Last Post: 11-09-2006, 02:53 PM
  3. Mysql Collation
    By creativepart in forum Dedicated Server
    Replies: 0
    Last Post: 06-20-2006, 11:56 AM
  4. Mysql 4.1 Collation
    By Serverplan in forum Hosting Security and Technology
    Replies: 5
    Last Post: 05-03-2005, 06:11 PM
  5. default jsp/tomcat charset?
    By Bashar in forum Hosting Security and Technology
    Replies: 4
    Last Post: 01-04-2004, 01:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •