miguel@Hermes:/backup/mysql$ scripts/mysql_install_db --user=mysql

FATAL ERROR: Could not find mysqld

The following directories were searched:

    /usr/libexec
    /usr/sbin
    /usr/bin

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.

The latest information about mysql_install_db is available at
http://kb.askmonty.org/v/installing-system-tables-mysql_install_db.
miguel@Hermes:/backup/mysql$

any advice how to fix this error?

thanks

Answer Answered by elenst in this comment.

You most likely have my.cnf file which points at /usr as the basedir. The simplest way is to do what the message says: provide the --basedir option explicitly on the command line. Or, run the script with --no-defaults.

Comments

Comments loading...