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
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.