0

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

3
  • Did you try running brew doctor? It might provide some helpful information. Aug 10, 2015 at 23:53
  • Yes. My system is ready to brew. Everything seems perfect outside of not working.
    – Rich_F
    Aug 10, 2015 at 23:57
  • I know this was migrated from SO, but you might get better responses at apple.stackexchange. Aug 11, 2015 at 8:31

0

You must log in to answer this question.

Browse other questions tagged .