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

...

   MySQL server running on Linux has default character encoding is latin1. To Please change this property add the following line in /etc/my.cnf file under [mysqld] section :

...

  • If my.cnf file is available in the directory where MySQL is installed, then add the following line in the file.


    lower_case_table_names=1

  • If the file is not available, then create the file my.cnf in the folder /etc using the following commands:
    cat > /etc/my.cnf << EOF
    [mysqld]
    datadir=/var/lib/mysql
    socket=/var/lib/mysql/mysql.sock
    lower_case_table_names=1
     
    [mysql.server]
    user=mysql
    basedir=/var/lib
     
    [safe_mysqld]
    err-log=/var/log/mysqld.log
    pid-file=/var/run/mysqld/mysqld.pid
    EOF

...

Note: The value of the innodb_buffer_pool_size variable can be safely set to 50% of the available memory if DB server is on different VM and no other apps are running on it.

MySQL server

...

collation 

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

Add below lines under [mysqld] section:

...

  • Connect to MySQL.
  • Run query: show variables like '%char%';
    Below The below output should get displayed.

...