MacOSX: autostart mysql on boot

前端 未结 7 871
隐瞒了意图╮
隐瞒了意图╮ 2020-12-13 08:41

I just installed mysql in terminal through homebrew.

Now when I try to connect to mysql it fails, but after I run mysqld it works..

So what I n

相关标签:
7条回答
  • 2020-12-13 09:38

    Nowadays, brew info mysql gives you this statement:

    To have launchd start mysql now and restart at login: brew services start mysql

    Or, if you don't want/need a background service you can just run: mysql.server start

    So running brew services start mysql will ensure it will run as a service and re-start on every login.

    If you run that command with sudo:

    sudo brew services start mysql
    

    will make the service run on boot and not after logging in, which is more useful for servers.

    0 讨论(0)
提交回复
热议问题