QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4323|回复: 8

关于编译安装MySQL的问题

[复制链接]
发表于 2008-8-19 19:58:08 | 显示全部楼层 |阅读模式
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单独分为一区。
发表于 2008-8-19 21:00:19 | 显示全部楼层
什么分区类型?
是不是权限问题?
回复

使用道具 举报

发表于 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)就运行了。
回复

使用道具 举报

 楼主| 发表于 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( manual pages.
----------------------------------------------------------------------


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


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

使用道具 举报

发表于 2008-8-20 20:09:41 | 显示全部楼层
你运行 mysqld ,什么输出?
回复

使用道具 举报

 楼主| 发表于 2008-8-20 20:24:04 | 显示全部楼层
[root@MagicLinux libexec]# ./mysqld
080820 20:23:15 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

080820 20:23:15 [ERROR] Aborting

080820 20:23:15 [Note] ./mysqld: Shutdown complete
回复

使用道具 举报

 楼主| 发表于 2008-8-20 20:52:27 | 显示全部楼层

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

使用道具 举报

发表于 2008-8-20 21:05:20 | 显示全部楼层
RPWT 这就是 RPWT!
回复

使用道具 举报

 楼主| 发表于 2008-8-20 21:32:37 | 显示全部楼层
RPWT
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-4-19 15:04 , Processed in 0.061701 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表