For homebrew mysql installs, where's my.cnf?

前端 未结 13 1293
夕颜
夕颜 2020-12-02 03:16

For homebrew mysql installs, where\'s my.cnf? Does it install one?

相关标签:
13条回答
  • 2020-12-02 04:19

    Nothing really helped me - I could not overwrite settings in a /etc/my.cnf file. So I searched like John suggested https://stackoverflow.com/a/7974114/717251

    sudo /usr/libexec/locate.updatedb
    # wait a few minutes for it to finish
    locate my.cnf
    

    It found another my.cnf in

    /usr/local/Cellar/mysql/5.6.21/my.cnf
    

    changing this file worked for me! Don't forget to restart the launch Agent:

    launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
    launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
    

    Update:

    If you have a fairly recent installation of homebrew you should use the brew services commands to restart mysql (use your installed homebrew mysql version, i.e. mysql or mysql@5.7):

    brew services stop mysql
    brew services start mysql
    
    0 讨论(0)
提交回复
热议问题