mysql包:
MySQL-server-advanced-5.5.8-1.rhel5.x86_64.rpm
MySQL-client-advanced-5.5.8-1.rhel5.x86_64.rpmlinux上mount的情况:
/dev/cciss/c0d0p2 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/cciss/c0d0p6 on /home type ext3 (rw)
/dev/cciss/c0d0p3 on /opt/alu type ext3 (rw)
/dev/cciss/c0d1p2 on /opt/alu/data type ext3 (rw)
/dev/cciss/c0d1p1 on /opt/alu/logs type ext3 (rw)
/dev/cciss/c0d0p1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)红色部分,/opt/alu/data/是预将data文件指定的位置。而/etc/init.d/mysql是在/下,/usr/sbin/mysqld也是在/下。
注意,,/opt/alu/data和根目录/是mount在不同的盘。当data指定位置和mysql启动相关文件是处于不同的盘上时,mysql服务启动不了。错误日志:
110402 16:02:00 mysqld_safe Starting mysqld daemon with databases from /opt/alu/
data/mysql
110402 16:02:00 [Warning] The syntax '--log' is deprecated and will be removed i
n a future release. Please use '--general-log'/'--general-log-file' instead.
110402 16:02:00 [Warning] The syntax '--log-slow-queries' is deprecated and will
be removed in a future release. Please use '--slow-query-log'/'--slow-query-log
-file' instead.
110402 16:02:00 [Warning] Can't create test file /opt/alu/data/mysql/zsuph225.lo
wer-test
110402 16:02:00 [Warning] Can't create test file /opt/alu/data/mysql/zsuph225.lo
wer-test
/usr/sbin/mysqld: Can't change dir to '/opt/alu/data/mysql/' (Errcode: 13)
110402 16:02:00 [ERROR] Aborting110402 16:02:00 [Note] /usr/sbin/mysqld: Shutdown complete110402 16:02:00 mysqld_safe mysqld from pid file /opt/alu/data/mysql/mysql.pid ended
当data指定于根目录下的某个位置时,就没事了。
求大家支招
MySQL-server-advanced-5.5.8-1.rhel5.x86_64.rpm
MySQL-client-advanced-5.5.8-1.rhel5.x86_64.rpmlinux上mount的情况:
/dev/cciss/c0d0p2 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/cciss/c0d0p6 on /home type ext3 (rw)
/dev/cciss/c0d0p3 on /opt/alu type ext3 (rw)
/dev/cciss/c0d1p2 on /opt/alu/data type ext3 (rw)
/dev/cciss/c0d1p1 on /opt/alu/logs type ext3 (rw)
/dev/cciss/c0d0p1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)红色部分,/opt/alu/data/是预将data文件指定的位置。而/etc/init.d/mysql是在/下,/usr/sbin/mysqld也是在/下。
注意,,/opt/alu/data和根目录/是mount在不同的盘。当data指定位置和mysql启动相关文件是处于不同的盘上时,mysql服务启动不了。错误日志:
110402 16:02:00 mysqld_safe Starting mysqld daemon with databases from /opt/alu/
data/mysql
110402 16:02:00 [Warning] The syntax '--log' is deprecated and will be removed i
n a future release. Please use '--general-log'/'--general-log-file' instead.
110402 16:02:00 [Warning] The syntax '--log-slow-queries' is deprecated and will
be removed in a future release. Please use '--slow-query-log'/'--slow-query-log
-file' instead.
110402 16:02:00 [Warning] Can't create test file /opt/alu/data/mysql/zsuph225.lo
wer-test
110402 16:02:00 [Warning] Can't create test file /opt/alu/data/mysql/zsuph225.lo
wer-test
/usr/sbin/mysqld: Can't change dir to '/opt/alu/data/mysql/' (Errcode: 13)
110402 16:02:00 [ERROR] Aborting110402 16:02:00 [Note] /usr/sbin/mysqld: Shutdown complete110402 16:02:00 mysqld_safe mysqld from pid file /opt/alu/data/mysql/mysql.pid ended
当data指定于根目录下的某个位置时,就没事了。
求大家支招
解决方案 »
- 请问在mysql中的映射是怎么回事啊
- postgresql 存储过程中调用外部c函数
- rpm方式安装mysql cluster问题出错,请问mysql5.0.77应该用哪个版本的cluster?
- 请教一个数据移植的问题
- 查询问题
- 数据库插入效率太低,怎么优化?
- 有个问题,不知道怎么弄!请高手帮忙
- 怎样分几次向MySQL数据库中insert into数据?
- red hat 8.0下安装mysql出问题了。。。
- $$$给分请教:在MySQL里,unsigned,zerofill都指什么?
- #1307 - Failed to CREATE FUNCTION是什么错误
- mysql三天两头出错打不开,帮忙看看是什么问题
启动文件,my.cnf权限都是root用户这个有什么问题麽?还有,数据文件权限没有限制吧,有人说必须是mysql用户
改为mysql用户权限试试看吧!
ll /opt/alu/
drwxr-xr-x 4 nbiops nbiops 4096 Apr 7 13:41 data
/opt/alu/data起初权限是这样子。/var/lib/mysql移动到/opt/alu/data后,/opt/alu/data/mysql权限是
drwxr-xr-x 5 mysql mysql
当数据文件放在/mysql时,服务能启动啊。这时候启动文件,my.cnf权限是root用户呢。
你的mysql的my.cnf里面的配置文件改了吗?数据文件的配置参数改到别的盘了吗?
列出的是涉及到的文件
ll /
drwxr-xr-x 5 mysql mysql 4096 Apr 7 14:00 mysql(当数据放这里时没有问题)
ll /etc/*my*
-rwxr-xr-x 1 root root 4844 Apr 2 16:06 /etc/my.cnfll /usr/sbin/*my*
-rwxr-xr-x 1 root root 47458457 Dec 4 02:25 /usr/sbin/mysqld
-rwxr-xr-x 1 root root 45461243 Dec 4 02:14 /usr/sbin/mysqld-debug
lrwxrwxrwx 1 root root 17 Apr 2 15:23 /usr/sbin/rcmysql -> /etc/init.d/mysqlll /etc/init.d/*my*
-rwxr-xr-x 1 root root 10591 Apr 2 16:07 /etc/init.d/mysqlll /opt/alu/data/
drwxr-xr-x 5 mysql mysql 4096 Apr 2 16:14 mysql
# chcon -R -h -t httpd_sys_content_t /www/web/
如果是mysql,方法为:
# chcon -R -t mysqld_db_t /mysql
http://topic.csdn.net/u/20100419/16/a1929b50-de24-4346-87ee-659a65668960.html
手动去启动一次。然后停掉服务。再移动数据文件的位置。这样子做,再启动服务时,就能正常启动了。。也就是说,安装之后,服务得启动过,再移动数据文件的位置,接下来服务才能在改变data路径后正常启动。不知道这是偶然现象还是必然
??
window下怎么比linux下复杂那么多啊?