Tuesday, November 24, 2015

mysql_install_db FATAL ERROR: Could not find ./bin/my_print_defaults

# pkg_info | grep -i mysql

mysql-client-5.5.9  Multithreaded SQL database (client)
mysql-server-5.5.9  Multithreaded SQL database (server)

# /usr/local/bin/mysql_install_db

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.

Solution:

Look for binary path:

# which mysql_install_db

/usr/local/bin/mysql_install_db

Look for binary path:

# which my_print_defaults

/usr/local/bin/my_print_defaults

Set basedir to /usr/local:

# /usr/local/bin/mysql_install_db --basedir=/usr/local

9 comments:

Anonymous said...

Thanx, this is what I needed.
You present your solution in a very spartanic (but therefore excellent) style.

If installing under an upgraded FreeBSD 8.1, update your ports first (I forgot that).
It is not necessary to install the 'portmaster', just install portsnap from the ports collection, then type 'portsnap update'.
After that you should be able to access the current MYSQL installation files via installing by the ports tree.

Tiago Marques said...

awsome keep up the good work

Chris said...

Thanks for the tip. Helped me out of a jam.

Jake said...

thanks a bunch, definitely clear and concise

Eduardo Vieira said...

Thank! Help me very!
Brazil!

Farhad Ahmed said...

good work!!! keep it up

Harm said...

Life saver!

red said...

Thank you

Anonymous said...

Realy usefull tip, thank you!