Changes to my.cnf don't take effect (Ubuntu 16.04, mysql 5.6)

前端 未结 2 508
遇见更好的自我
遇见更好的自我 2020-12-30 18:16

Changes I make to my.cnf don\'t seem to have any effect on the mysql environment. Here\'s a summary of what\'s happened...

I installed mysql 5.7 on Ubuntu 16.04 but

2条回答
  •  隐瞒了意图╮
    2020-12-30 19:08

    Obviously my.cnf.fallback is not the correct configuration file.

    If you try this commands you can get output for possible my.cnf locations:

    $ which mysqld
    /usr/sbin/mysqld
    
    $ /usr/sbin/mysqld --verbose --help | grep -A 1 "Default options"
    Default options are read from the following files in the given order:
    /etc/mysql/my.cnf ~/.my.cnf /usr/etc/my.cnf
    

    It means mysql will check those locations for my.cnf file. Simply rename /etc/mysql/my.cnf.fallback as /etc/mysql/my.cnf:

    mv /etc/mysql/my.cnf.fallback /etc/mysql/my.cnf
    

提交回复
热议问题