I'm having issues with getting mysql installed properly under homebrew. I want homebrew to manage it, and I had it installed manually using the .dmg installer beforehand. I've backed up my data into an sql file.
I uninstalled all versions of mysql including my homebrew version. No mysql versions anywhere. So then I use homebrew to install mysql and it installs. I log in using root, and I try to create a database:
mysql> create database `fem`;
ERROR 1006 (HY000): Can't create database 'fem' (errno: 2)
I keep getting that error.
So I look where the data is kept:
$ mysqladmin -u username -ppassword VARIABLES | grep datadir
| datadir | /usr/local/mysql/data/
But there is no /usr/local/mysql directory. I ask which mysql it's using and it replies:
/usr/local/bin/mysql
...which is an alias to the Cellar mysql, which is proper. I'm thinking for some reason it's looking at the wrong location for the data. I'm not sure where homebrew's mysql data directory is supposed to be. I don't have any my.cnf files anywhere, and I've never used one, just default setup.
Any advice appreciated how I fix this stuff.
Cheers
brew doctor
? It might provide some helpful information.