default db collation

Discussion in 'General' started by guardian, May 14, 2007.

  1. guardian

    guardian Member

    I want all databases to be created by default with utf-8 collation.
    Where can I change the default collation?
     
  2. danf.1979

    danf.1979 Member

    You can do so in /etc/mysql/my.cnf
    Just add this lines to [mysqld] section, so it looks like:
    Code:
    [mysqld]
    # utf-8
    init-connect='SET NAMES utf8'
    character-set-server=utf8
    collation-server=utf8_general_ci
    default-character-set=utf8
    default-collation=utf8_general_ci
    # end utf-8
    .
    .
    .
    the rest here...
    
     

Share This Page