我在一台Linux下用Make和Make Install安装了Mysql,开始用configure指定了安装目录:/home/mysql。
现在将这个Mysql放到了另一台Linux下,目录为/home/test/mysql,之后执行./mysql_install_db --datadir=../var/
然后得到错误:
FATAL ERROR: Could not find /home/mysql/bin/my_print_defaultsIf 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 or use
use --source-install --install-dir=xxx from the top source directory后来我用
./mysql_install_db --datadir=../var/ --basedir=./
./mysql_install_db --datadir=../var/ --source-install=./
./mysql_install_db --datadir=../var/ --install-dir=./
都不行。那么我想问,把Mysql放到生成时configure指定目录之外的目录,通过什么可以安装mysql的系统表var。请指教。最好别说把Var拷贝过来。
现在将这个Mysql放到了另一台Linux下,目录为/home/test/mysql,之后执行./mysql_install_db --datadir=../var/
然后得到错误:
FATAL ERROR: Could not find /home/mysql/bin/my_print_defaultsIf 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 or use
use --source-install --install-dir=xxx from the top source directory后来我用
./mysql_install_db --datadir=../var/ --basedir=./
./mysql_install_db --datadir=../var/ --source-install=./
./mysql_install_db --datadir=../var/ --install-dir=./
都不行。那么我想问,把Mysql放到生成时configure指定目录之外的目录,通过什么可以安装mysql的系统表var。请指教。最好别说把Var拷贝过来。
MySQL yourself you must run 'make install' first or use
use --source-install --install-dir=xxx from the top source directory 这样做了吗?
比如你要安装到/usr/local/mysql直接这样安装
/usr/local/mysql/scripts/mysql_install_db --user=mysql
chown -R mysql:mysql /usr/local/mysql