After installing MySql with homebrew, I wasn't able to get the server running. It was a fresh install on a new computer that had never had mysql installed before.
brew install mysql
mysql_install_db --verbose --user=whoami --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
.................................................................................................... ERROR! The server quit without updating PID file (/usr/local/var/mysql/Emma-Lindsays-MacBook-Pro-2.local.pid)
I'm not sure if I'm missing a step in the middle here or not, but I've always been able to clearly follow the install instructions for mysql on homebrew before and never had a problem like this.
same problem for me
A recent update to the MySQL formula should address this.
You can also try:
mkdir -p /usr/local/var/mysql
I'm having the exact same issue. Why is this issue closed?
Experiencing this issue right now.
I'm getting the same
+1 on this problem. What is the problem?
I had this problem and the fix for me was to run:
sudo rm /etc/my.cnf
It's from an old manual mysql install from long ago and it conflicts with the homebrew mysql config.
Saw similar problem using 5.5.15.
Nothing worked until the file /usr/local/var/mysql/[computer-name].err was emptied. Then mysql.server start worked.
Hmm ok I will try this. Been mostly on my work computer so have not had the time to check. Let you know when I do. Thanks!
Fannar, your solution works. Thakns!
Having the same problem, here is a gist of my cmd line output https://gist.github.com/2017873 I've tried all the suggested fixes but no luck. Brew install mysql 5.5.15 now
I managed to fix this using
mysql_install_db --verbose --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
Seems to be an issue with the correct datadir and basedir and tmpdir folders..Just running mysql_install_db fails with a few errors about not finding my_print_defaults. I got past this however i then had the issue at startup of mysql.
The above command seemed to fix it however the only difference i see is that you set the user where i do not!
Thanks for the tip Themitchell. worked like a charm!
I noticed I have to create a my.cnf by hand if the datadir differs from the default location (/usr/local/var/mysql). I installed MySQL with the following command:
mysql_install_db --verbose --user=raphael --basedir="$(brew --prefix mysql)" --datadir=/Users/raphael/Webseiten/mysql-data --tmpdir=/tmp
When I tried to launch MySQL the logs showed the same error as in the initial post:
ERROR! The server quit without updating PID file (/usr/local/var/mysql/raphael.local.pid).
The logs revealed that mysqld still tries to find its tables in /usr/local/var/mysql, so I added a /usr/local/etc/my.cnfwith the following content:
Thanks Themitchell! It works for me!
Error is Starting MySQL
. ERROR! The server quit without updating PID file (/usr/local/var/mysql/MP16.local.pid).
But, there is no folder in local/var for me to delete MP16.err file
I tried all the solutions but still have the same problem.
It began occurring after i did a brew switch from mysql 5.6.10 to 5.5.25.
I've also tried switching back to 5.6.10, but the problem is still there.
The MySQL database probably isn't backwards compatible.
@fannar solution works.
rm -rf /usr/local/var/mysql/macbook.local.err
When I try the suggested fix the .err and then run mysql.server restart file is immediately recreated.
@amk221 Open a new issue.