mysql/scripts/mysql_install_db --defaults-file=/data/mysql/my.cnf --basedir=/usr/local/mysql --datadir=/data/mysql/data --user=mysql
FATAL ERROR: Could not find my_print_defaults
The following directories were searched:
/usr/local/mysql/bin
/usr/local/mysql/extra
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.
解决办法:应正确指定安装路径,数据存放路径,有时候可能是路径指定错了 我就遇到过这样
scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data