问题
I seem to be having an issue getting MySQL 5.6.1.5 to install from Source. I am running RHEL 6.
I was able to perform the cmake
, make
, and make install
without issues.
I am attempting to run the mysql_install_db
binary and when I do I get 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 bat at the top level of the extracted archive, or pass the --basedir option pointing to that location.
So I did a check for my_print_defaults
using which my_print_defaults
, unfortunately it was not found on my machine.
I did a locate my_print_defaults
as well just for the heck of it and said it was located in /usr/bin/my_print_defaults
, however, when I checked /usr/bin
for the binary, it was not actually there.
I would try to use mysql_install_db --basedir=/usr/bin
but I know this won't work as the which
and locate
commands confirm my_print_defaults
isn't on my machine.
I looked at mysql_install_db giving error, but that error was not similar to this one.
回答1:
Please ignore question, I didn't bother to try running find / -name my_print_defaults
and found it in /usr/local/mysql/bin/
回答2:
I searched packages for my_print_defaults
with
apt-file search my_print_defaults
If my_print_defaults
is missing on your system (which my_print_defaults
), first find out which db is installed with:
dpkg -l |grep -E 'maria|mysql'|grep ii|grep server
If you have installed mariadb, try reinstall mariadb:
sudo apt install --reinstall mariadb-server-core-10.1
If you don't find a solution with mariadb, swap back to mysql with
sudo apt install mysql-server
来源:https://stackoverflow.com/questions/21146305/error-running-mysql-install-db-could-not-find-bin-my-print-defaults