mysql启动错误

mcknight
mysql启动错误

启动时出现这种错误是怎么回事啊?
[table=95%][tr][td][font=FixedSys]mcknight@mcknight-laptop:/usr/local/mysql/bin$ sudo ./mysqld_safe
Starting mysqld daemon with databases from /usr/local/mysql/data
STOPPING server from pid file /usr/local/mysql/data/mcknight-laptop.pid
080602 20:31:26  mysqld ended
[/font][/td][/tr][/table]

chinaunix12321
回复 #1 mcknight 的帖子

应该是权限问题!

todayhero
[quote]原帖由 [i]mcknight[/i] 于 2008-6-2 20:36 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=8502743&ptid=1134737][img]http://bbs.chinaunix.net/images/common/back.gif[/img][/url]
启动时出现这种错误是怎么回事啊?
mcknight@mcknight-laptop:/usr/local/mysql/bin$ sudo ./mysqld_safe
Starting mysqld daemon with databases from /usr/local/mysql/data
STOPPING server from pid fi ... [/quote]

查看一下.此目录下的 /usr/local/mysql/data/HOST-NAME.err错误日志,里面会有错误的具体资料.

mcknight
[table=95%][tr][td][font=FixedSys]080603 20:14:52  mysqld started
080603 20:14:52 [ERROR] /usr/local/mysql/libexec/mysqld: Can't create/write to file '/usr/local/mysql/data/mcknight-laptop.pid' (Errcode: 13)
080603 20:14:52 [ERROR] Can't start server: can't create PID file: Permission denied
080603 20:14:52  mysqld ended
[/font][/td][/tr][/table]
sudo了还是不行啊~
root也不能创建PID吗?

yueliangdao0608
This error no means permission denied.

ProfessorTian
建议看一下/usr/local/mysql/data目录的用户和属组,说不定是这个原因

我是DBA
一、首先到配置文件里去查看错误日志有没有启动起来,没启起来,把它加进去,一般查看日志就知道原因,不知道的话,把错误日志贴出来给大家看
二、重置文件权限
chown -R root:mysql /usr/local/mysql
chown -R mysql:mysql /usr/local/mysql/data/

yueliangdao0608
[quote]原帖由 [i]我是DBA[/i] 于 2008-6-4 14:41 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=8515109&ptid=1134737][img]http://bbs.chinaunix.net/images/common/back.gif[/img][/url]
一、首先到配置文件里去查看错误日志有没有启动起来,没启起来,把它加进去,一般查看日志就知道原因,不知道的话,把错误日志贴出来给大家看
二、重置文件权限
chown -R root:mysql /usr/local/mysql
chown ... [/quote]


chown -R mysql:mysql /usr/local/mysql