Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mysql_install_db cannot find file

I am trying to use mysql_install_db

I am getting the following error:

FATAL ERROR: Could not find ./bin/my_print_defaults

If you compiled from source, you need to run 'make install' to copy the software into the correct location ready for operation.

If you are using a binary release, you must either be at the top level of the extracted archive, or pass the --basedir option pointing to that location.

I've tried using

    which my_print_defaults

It returns:

    /usr/local/bin/my_print_defaults

So I try the command:

    mysql_install_db --base-dir=/usr/local/bin/ 

I still receive the same error, though.

like image 435
Union find Avatar asked Jul 11 '13 19:07

Union find


1 Answers

Annoyingly, this just means you have to be in the right directory to execute this. Make sure you're in /usr/local/Cellar/mysql/<version>/ before running the script.

like image 127
Kelley Robinson Avatar answered Oct 06 '22 23:10

Kelley Robinson