MySql configuration case

  1. After installation mysql5.7 new version of linux environment default it is case-sensitive. You can execute the following command on the client:
SHOW VARIABLES LIKE '%case%'

Lower_case_table_names can see the value is zero, we have to do is set it to 1. The steps are as follows:

  1. Use vi /etc/mysql/my.cnf, open mysql configuration file, mysqld under this node, adding:
lower_case_table_names=1

Note: Be sure to put down mysqld nodes, on the other node, it will not take effect !!!!


  1. After setting, save
  2. Restart mysql service
  3. Then perform
SHOW VARIABLES LIKE '%case%'

You can see, it has become the 1.


  1. When the restart mysql service, will use the restart command
service mysqld restart 

may appear

Failed to restart mysqld.service: Unit not found.

Execute chkconfig --list, find the specific name of mysql services, such as is mysqldddd

Then execute

service mysqldddd restart 

will see

    Shutting down MySQL....[ OK ]
    Starting MySQL.[ OK ]

Guess you like

Origin www.cnblogs.com/LoveShare/p/11615335.html