Reputation: 4275
I've been running mysql55 (5.5.30) under homebrew for a while, and yesterday I updated it to 5.5.44 using brew upgrade mysql55
. Now, I am unable to log into mysql or even get it running. Important notes:
1) After running, I got the The post-install step did not complete successfully
You can try again using 'brew postinstall homebrew/versions/mysql55'
and This formula is keg-only, which means it was not symlinked into /usr/local.
message. Running the suggested command doesn't seem to do anything.
2) Running mysql.server start
worked fine before. Now I get command not found
when I try to run any mysql command. I also ran launchctl unload and then load on the plist file. I can start mysql using /usr/local/opt/mysql55/bin/mysql
but I can't connect with my client using /tmp/mysql.sock (I get access denied). I tried adding /tmp/mysql.sock, but that doesn't make a difference.
3) My current data is stored in /usr/local/var/mysql (it has directories for all my current dbs), but there is a new /user/local/var/mysql55 directory with the default test, mysql, and performance_schema directories.
4) I tried modifying the mysql55.plist file to point to /usr/local/var/mysql as the data dir, and unloading and loading it again with launchctl, but I still get nothing.
5) My path has /usr/local, and the only difference I can see between now and pre-upgrade is the new data directory. The output from brew upgrade shows the command /usr/local/Cellar/mysql55/5.5.44/bin/mysql_install_db --verbose --user=steve --basedir=/usr/local/Cellar/mysql55/5.5.44 --datadir=/usr/local/var/mysql55 --tmpdir=/tmp
was run. I modified it to point to the current data dir (--data-dir=/usr/local/var/mmysql), and it seemed to run ok, but I still don't get anything when I run mysql. The previous version was 5.5.30, so it seems that something is still linked to that directory.
What do I need to do just to get mysql.server to work again, using my current data directory of /usr/local/var/mysql?
Thanks.
Upvotes: 1
Views: 1382
Reputation: 4275
I ran the mysql_install_db
a couple times with --datadir=/usr/local/var/mysql
to no effect, so I ended up just adding
basedir = /usr/local/Cellar/mysql55/5.5.44
datadir = /usr/local/var/mysql
to /etc/my.cnf, and it finds the data directory fine now.
Upvotes: 1