mysql ignore case configuration

Quote: https://www.jianshu.com/p/9ff5c50ed7c7

ps. the newly installed linux system, obviously library contains tables a, but said that there is no log, a closer look at the table name is capitalized, had an idea they think is case sensitive!

Hang this kind of thing, Caicai more healthy!

  1. After installation mysql5.7 new version of linux environment default 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 


Author: Journey _ who
link: https: //www.jianshu.com/p/9ff5c50ed7c7
Source: Jane books
are copyrighted by the author. Commercial reprint please contact the author authorized, non-commercial reprint please indicate the source.

Guess you like

Origin www.cnblogs.com/breakingbrad/p/12417380.html