mysql5.7默認lower_case_table_names=1唁情,event_scheduler=OFF
原來的my.cnf在/etc/目錄下斧蜕,當修改lower_case_table_names=1和開啟數據庫事件event_scheduler=ON后瓤帚,
use mysql;
show variables like "%table_names%";
show variables like "%event%";
查詢結果依然還是
lower_case_table_names=1嘿架,event_scheduler=OFF
解決辦法是
把配置文件復制到mysql安裝目錄的根目錄垛耳,當前機器目錄是/usr/local/
于是:
cp /etc/my.cng /usr/local/mysql/my.cnf
進入目錄之后文件列表
[root@--------- home]# cd /usr/local/mysql/
[root@--------- mysql]# ll
total 60
drwxr-xr-x 2 7161 wheel 4096 Feb 2 2016 bin
-rw-r--r-- 1 7161 wheel 17987 Feb 2 2016 COPYING
drwxr-xr-x 20 mysql mysql 4096 Sep 17 16:17 data
drwxr-xr-x 2 7161 wheel 4096 Feb 2 2016 docs
drwxr-xr-x 3 7161 wheel 4096 Feb 2 2016 include
drwxr-xr-x 5 7161 wheel 4096 Feb 2 2016 lib
drwxr-xr-x 4 7161 wheel 4096 Feb 2 2016 man
-rwxr-xr-x 1 root root 76 Sep 17 16:17 my.cnf
-rw-r--r-- 1 7161 wheel 2478 Feb 2 2016 README
drwxr-xr-x 28 7161 wheel 4096 Feb 2 2016 share
drwxr-xr-x 2 7161 wheel 4096 Feb 2 2016 support-files
my.cnf文件內容為:
[mysqld]
#mysql新配置文件
event_scheduler=ON
lower_case_table_names=1
再次查詢栅屏,修改已經生效