Mysql_install_db cannot find file

database, installation, mysql

Solution

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.

Problem

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.

Original source