I've download MySQL and I'm trying to setup the MySQL grant tables, but when I type:
scripts/mysql_install_db --basedir=/usr/local
I get the error above.
I'm not sure how to fix it, as my-default.cnf
is in the support_files
directory and I believe I'm setting the basedir
correctly.
(This is on mac btw)
(I'm assuming you're using Homebrew, since I hit the same issue trying to do the same thing on Homebrew on my macbook)
I believe you need to point it to the actual mysql directory in the cellar as its basedir, not at /usr/local (since that's just things symlinked from the cellar dir).
So, in my case, I had to use:
$ mysql_install_db --basedir=/usr/local/Cellar/mysql/5.6.10
Need copy /usr/share/my.cnf
Try this:
sudo cp /etc/mysql/my.cnf /usr/share/mysql/my-default.cnf
sudo mysql_install_db
Its help for me on Ubuntu 14.04 and mysql 5.6.33
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With