免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3870 | 回复: 4
打印 上一主题 下一主题

刚安装完MYSQL,无法启动 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-04-06 15:23 |只看该作者 |倒序浏览
[root@blast bin]# 140406 23:14:22 mysqld_safe Logging to '/var/log/mysqld.log'.
140406 23:14:22 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140406 23:14:22 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

[1]+  Done                    ./mysqld_safe --user=mysql
[root@blast bin]#
[root@blast log]# more mysqld.log
140406 21:15:45 mysqld_safe Starting mysqld daemon with databases from /var/lib/
mysql
140406 21:15:45 [ERROR] /usr/local/mysql/libexec/mysqld: Can't create/write to f
ile '/var/run/mysqld/mysqld.pid' (Errcode: 2)
140406 21:15:45 [ERROR] Can't start server: can't create PID file: No such file
or directory
140406 21:15:45 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ende
d
140406 21:25:22 mysqld_safe Starting mysqld daemon with databases from /var/lib/
mysql
140406 21:25:23 [ERROR] /usr/local/mysql/libexec/mysqld: Can't create/write to f
ile '/var/run/mysqld/mysqld.pid' (Errcode: 2)
140406 21:25:23 [ERROR] Can't start server: can't create PID file: No such file
or directory
140406 21:25:23 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ende
d
140406 21:27:47 mysqld_safe Starting mysqld daemon with databases from /var/lib/
mysql
140406 21:27:47 [ERROR] /usr/local/mysql/libexec/mysqld: Can't create/write to f
ile '/var/run/mysqld/mysqld.pid' (Errcode: 2)
140406 21:27:47 [ERROR] Can't start server: can't create PID file: No such file
or directory
140406 21:27:47 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ende
d
140406 23:14:22 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140406 23:14:22 [ERROR] /usr/local/mysql/libexec/mysqld: Can't create/write to file '/var/run/mysqld/mysqld.pid' (Errcode: 2)
140406 23:14:22 [ERROR] Can't start server: can't create PID file: No such file or directory
140406 23:14:22 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended


为什么会出现这个目录呀??140406 21:15:45 [ERROR] /usr/local/mysql/libexec/mysqld: Can't create/write to f
ile '/var/run/mysqld/mysqld.pid' (Errcode: 2)
难道要我去手动创建这个目录吗??请教下各位,谁来帮忙看看

论坛徽章:
1
处女座
日期:2014-01-21 13:20:51
2 [报告]
发表于 2014-04-06 20:05 |只看该作者
是不是你权限不够呢?

论坛徽章:
0
3 [报告]
发表于 2014-04-06 20:37 |只看该作者
回复 2# webdna



[root@blast local]# ll
total 64
drwxrwxrwx. 14 root root  4096 Apr  5 19:35 apache
drwxrwxrwx.  6 root root  4096 Apr  5 19:20 apr
drwxr-xr-x.  5 root root  4096 Apr  5 19:24 apr-util
drwxr-xr-x.  2 root root  4096 Sep 23  2011 bin
drwxr-xr-x.  2 root root  4096 Sep 23  2011 etc
drwxr-xr-x.  2 root root  4096 Sep 23  2011 games
drwxr-xr-x.  2 root root  4096 Sep 23  2011 include
drwxr-xr-x.  2 root root  4096 Sep 23  2011 lib
drwxr-xr-x.  2 root root  4096 Sep 23  2011 lib64
drwxr-xr-x.  2 root root  4096 Sep 23  2011 libexec
drwxr-xr-x. 11 root mysql 4096 Apr  6 22:59 mysql
drwxr-xr-x.  2 root root  4096 Apr  5 19:21 pcre
drwxr-xr-x.  2 root root  4096 Apr  5 20:38 php
drwxr-xr-x.  2 root root  4096 Sep 23  2011 sbin
drwxr-xr-x.  5 root root  4096 Apr  4 20:01 share
drwxr-xr-x.  2 root root  4096 Sep 23  2011 src
[root@blast local]# cd mysql/
[root@blast mysql]# ll
total 36
drwxr-xr-x.  2 root mysql 4096 Apr  6 22:51 bin
drwxr-xr-x.  2 root mysql 4096 Apr  6 22:35 data
drwxr-xr-x.  2 root mysql 4096 Apr  6 22:51 docs
drwxr-xr-x.  3 root mysql 4096 Apr  6 22:50 include
drwxr-xr-x.  3 root mysql 4096 Apr  6 22:51 lib
drwxr-xr-x.  2 root mysql 4096 Apr  6 22:59 libexec
drwxr-xr-x. 10 root mysql 4096 Apr  6 22:59 mysql-test
drwxr-xr-x.  5 root mysql 4096 Apr  6 22:59 share
drwxr-xr-x.  5 root mysql 4096 Apr  6 22:59 sql-bench
[root@blast mysql]#


应该没有错吧SELINUX我也关闭了

论坛徽章:
0
4 [报告]
发表于 2014-04-08 12:16 |只看该作者
/var/run/mysqld/mysqld.pid 权限吧

论坛徽章:
0
5 [报告]
发表于 2014-04-08 20:03 |只看该作者
回复 4# gu_jj


    话说其实我去查了下/var/run/,下面没有mysqld.....后来把/etc/my.cnf修改了就好了.../usr/local/mysql/libexec/mysqld没有配对...
感谢答谢的关注我的问题
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP