我在FreeBSD8.2上用port安装了mysql55后不能初始化DB,日志如下,谁帮看下?
本帖最后由 huowz 于 2011-05-01 00:54 编辑
没有加参数,默认方式装的。用find能找到my_print_defaults,应该改哪些参数?
./mysql_install_db --user=mysql &
[1] 28876
bzxx#
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 be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.
[1] Exit 1 ./mysql_install_db --user=mysql
bzxx# find / -name my_print_defaults
/usr/local/bin/my_print_defaults
没有加参数,默认方式装的。用find能找到my_print_defaults,应该改哪些参数?
./mysql_install_db --user=mysql &
[1] 28876
bzxx#
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 be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.
[1] Exit 1 ./mysql_install_db --user=mysql
bzxx# find / -name my_print_defaults
/usr/local/bin/my_print_defaults
作者: huowz 发布时间: 2011-05-01
如果是使用 ports 来安装的 mysql,那么在你 make 的时候会有一串字符界面下的选项提示,测试用的话我通常只加 with_charset=gb2312, with_xcharset=all, 其他的可以按自己的需要来加。
还有 ./mysql_instsll_db 的时候我没有加过任何参数,可以直接初始化的。
你那段英文提示没有找到 ./bin/my_print_defaults,如果使用源码编译,使用 make install 命令来让它自己复制相关的文件,如果是使用二进制包的话,可以试试指定 basedir 路径,在你的 mysql 的启动文件里。
还有 ./mysql_instsll_db 的时候我没有加过任何参数,可以直接初始化的。
你那段英文提示没有找到 ./bin/my_print_defaults,如果使用源码编译,使用 make install 命令来让它自己复制相关的文件,如果是使用二进制包的话,可以试试指定 basedir 路径,在你的 mysql 的启动文件里。
作者: zero-B 发布时间: 2011-05-01
make 的时候会有一串字符界面下的选项提示
我看到了
我看到了
作者: wjpl11 发布时间: 2011-05-01
我装的是55,就两个提示,忘了是什么了,不行就装回51算了。
作者: huowz 发布时间: 2011-05-01
vi mysql_install_db
把basedir=“”改为basedir=“/usr/local”
把basedir=“”改为basedir=“/usr/local”
作者: YYY 发布时间: 2011-11-24