cd I ran into a big pain in the butt today with mysql server giving up on me, so I’ve decided to remove it and install MariaDB instead on my Mac machine, however after installed successfully via Homebrew
brew install mariadb, I couldn’t get the server to start.
MySQL/MariaDB server doesn’t start when running command
mysql.server start (trust me, even
brew services start mariadb says it’s started successfully — it’s not…)
The error log is sitting at
In my case, the error log has this 2 lines:
[ERROR] Can’t start server : Bind on unix socket: Permission denied
[ERROR] Do you already have another mysqld server running on socket: /tmp/mysql.sock
and this is what I had to do to solve the problem:
- Make sure you don’t have any other mysql server installed or running. If you do, then this is not an issue, use the other one.
- Run the post install script
- Change the owner of /tmp to your user sudo chown
Then when I run mysql
.server start, there is no more error in the log and the server starts successfully.
Hope this is helpful to you