xiaoxiaosong 发表于 2008-8-19 19:58:08

关于编译安装MySQL的问题

ML上安装MySQL,2.0及2.1的快照版都呆以正常编译安装的,Rc1上则不行:
MySQL为mysql-4.1.19.tar.gz,编译时configure加 --prefix=/usr/local/mysql --sysconfdir=/etc --localstatedir=/var/lib/mysql 参数。
整个过程都是正常完成退出,但在/var/lib下没有mysql的存在,启动mysql失败。
以前2.0及2.1快照版/及/var为同一分区,2.1Rc1下/var单独分为一区。

jiangtao9999 发表于 2008-8-19 21:00:19

什么分区类型?
是不是权限问题?

walkerxk 发表于 2008-8-20 11:48:59

新建/var/lib/mysql看看,记得chown mysql.mysql。
mysql其实有编译好的版本,non rpm的版本就是,我是拿来后直接解压到/usr/local下面,然后做个符号连接(ln -sf /usr/local/mysql-5.0.67-linux-i686 /usr/local/mysql)就运行了。

xiaoxiaosong 发表于 2008-8-20 19:47:10

make   install时:
PATH="$PATH:/sbin" ldconfig -n /usr/local/mysql/lib/mysql
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/mysql/lib/mysql

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
   during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
   during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------


不知为何改到那个路径了。
相应改了下权限设置,仍然无法启动mysql。


以前在ML2.0及2.1的快照版都是同一版本,同一编译参数都可以正常安装,不知为何在Rc1下不行。

jiangtao9999 发表于 2008-8-20 20:09:41

你运行 mysqld ,什么输出?

xiaoxiaosong 发表于 2008-8-20 20:24:04

# ./mysqld
080820 20:23:15 Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

080820 20:23:15 Aborting

080820 20:23:15 ./mysqld: Shutdown complete

xiaoxiaosong 发表于 2008-8-20 20:52:27

:oops:
不知为何,以make unstall删掉安装的,并删除/usr/local/mysql,然后 以编译好的重新 make install,结果/var/lib/mysql成功写入。Mysql启动成功

jiangtao9999 发表于 2008-8-20 21:05:20

RPWT 这就是 RPWT!

xiaoxiaosong 发表于 2008-8-20 21:32:37

RPWT:?:
页: [1]
查看完整版本: 关于编译安装MySQL的问题