今天本人在linux下安裝mysql時提示 Could not find ./bin/my_print_defaults,後來搜索了一些解決方法分離給大家,有碰到此類問題的朋友可參考。
錯誤提示
FATAL ERROR: Could not find ./bin/my_print_defaults
If you are using a binary release, you must run this script from
within the directory the archive extracted into. If you compiled
MySQL yourself you must run 'make install' first.
原因分析
如果用/usr/local/mysql/scripts/mysql_install_db --user=mysql
解決方法:
[root@bogon scripts]# /usr/local/mysql/scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data &(這點非常重要)