DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

(mysql.info.gz) Charset-server

Info Catalog (mysql.info.gz) Charset-defaults (mysql.info.gz) Charset-defaults (mysql.info.gz) Charset-database
 
 10.3.1 Server Character Set and Collation
 -----------------------------------------
 
 The MySQL Server has a server character set and a server collation,
 which may not be null.
 
 MySQL determines the server character set and server collation thus:
 
    * According to the option settings in effect when the server starts
 
    * According to the values set at runtime
 
 
 At the server level, the decision is simple. The server character set
 and collation depend initially on the options that you use when you
 start `mysqld'. You can use `--default-character-set' for the character
 set, and along with it you can add `--default-collation' for the
 collation. If you don't specify a character set, that is the same as
 saying `--default-character-set=latin1'. If you specify only a
 character set (for example, `latin1') but not a collation, that is the
 same as saying `--default-charset=latin1'
 `--default-collation=latin1_swedish_ci' because `latin1_swedish_ci' is
 the default collation for `latin1'.  Therefore, the following three
 commands all have the same effect:
 
      shell> mysqld
      shell> mysqld --default-character-set=latin1
      shell> mysqld --default-character-set=latin1 \
                 --default-collation=latin1_swedish_ci
 
 One way to change the settings is by recompiling. If you want to change
 the default server character set and collation when building from
 sources, use: `--with-charset' and `--with-collation' as arguments for
 `configure'. For example:
 
      shell> ./configure --with-charset=latin1
 
 Or:
 
      shell> ./configure --with-charset=latin1 \
                 --with-collation=latin1_german1_ci
 
 Both `mysqld' and `configure' verify that the character set/collation
 combination is valid. If not, each program displays an error message
 and terminates.
 
 The current server character set and collation are available as the
 values of the `character_set_server' and `collation_server' system
 variables.  These variables can be changed at runtime.
 
Info Catalog (mysql.info.gz) Charset-defaults (mysql.info.gz) Charset-defaults (mysql.info.gz) Charset-database
automatically generated byinfo2html