Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Note

This step has to be performed before creating the database. Restart MySQL for any setting change in my.cnf.

Editing my.cnf file

If The 'my.cnf'file is usually present in the MySQL directory. , then add the following lines in the file.

...

The database server running on Linux has default character encoding is latin1. Change this property add the following line in /etc/my.cnf file under  

Add below line below [mysqld] section:

  [mysqld]

  character  character-set-server=utf8

  Add below lines above the [mysqld] session.

...

A database collation is a set of rules used to compare characters in a character set. We configure collation as 'utf8_unicode_ci' because it supports all character used in the US, Canada, Australia, and Europe (Latin and Greek).

Add below lines under [mysqld] section in my.cnf file:

...