1
votes

something strange is happening while trying to run MySQL server on my MacBook Air. First ill installed MySQL using brew install mysql. Installation was successful without any errors. And then problems started to showing up... First i had to use following command in order to create empty tables: cd /usr/local sudo mysql_install_db --user=mysql --ldata=/var/db/mysql

Now im trying to launch the server service itself, but another error is not allowing me to do it: ivankutsarov$ sudo mysql.server start Password: Starting MySQL . ERROR! The server quit without updating PID file (/usr/local/var/mysql/Ivans-MacBook-Air.local.pid).

While ill navigate to the mentioned folder i cant see mysql folder in it, neither i can see it in my /usr/local/bin directory.

Any ideas guys?

2
A quick Googling of the error yields this result.Josh

2 Answers

0
votes

Guys i found the problem. I forgot to run these 2 commands after installing mysql:

First, run: brew help mysql

Read the info displayed after command was executed, and you will notice in the first 2 lines the following commands which are necessary to run in order to start your server!

1.

unset TMPDIR

2.

mysql_install_db --verbose --user=whoami --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp

0
votes

I had a similar problem a day ago. mysql functioned fine until out of the blue PID file errors occur. I tried everything to fix the installation, replacing a dozen of files and trying many different settings.

what eventually worked was a clean install of mysql via the dmg package and a migration of my data&schema's to this install (use mysql workbench for this to save time), then uninstalled the version installed via brew.

https://dev.mysql.com/downloads/file/?id=466265