Mysql启动报错’./mysql-bin.index’ not found的问题
发布:smiling 来源: PHP粉丝网 添加日期:2014-09-25 16:28:22 浏览: 评论:0
今天试着更改了mysql的数据存储目录,如何更改mysql的存储目录,但是启动mysql一直提示Starting MySQL. ERROR! The server quit without updating PID file (/data/mysql/11Z.pid)
于是乎去查看mysql的错误日志,cat /data/mysql/11Z.err:
- 131204 09:09:15 mysqld_safe Starting mysqld daemon with databases from /data/mysql
- /usr/local/mysql/bin/mysqld: File './mysql-bin.index' not found (Errcode: 13)
- 131204 9:09:15 [ERROR] Aborting
- 131204 9:09:15 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete
- 131204 09:09:15 mysqld_safe mysqld from pid file /data/mysql/11Z.pid ended
- 131204 09:09:22 mysqld_safe Starting mysqld daemon with databases from /data/mysql
- /usr/local/mysql/www.phpfensi.com/mysqld: File './mysql-bin.index' not found (Errcode: 13)
- 131204 9:09:22 [ERROR] Aborting
- 131204 9:09:22 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete
- 131204 09:09:22 mysqld_safe mysqld from pid file /data/mysql/11Z.pid ended
提示./mysql-bin.index无法找到(由于mysql开启了bin日志功能),到数据库根目录查看该文件是存在的,可能是文件权限的问题,查看了数据库根目录的权限是700,所有者和用户组都是root,可能是上次转移数据库的时候不小心修改了文件夹的权限。
使用命令chown -R mysql.mysql /data/mysql/ 更改权限后,重新启动mysql,一切正常.
修改文件夹权限,代码如一:
- [root@XXXX mysql]# pwd
- /var/lib/mysql
- [root@XXXX mysql]# chown -R mysql:mysql binlogs
- [root@XXXX mysql]#
- [root@XXXX mysql]# /etc/init.d/mysql restart
- MySQL manager or server PID file could not be found! [FAILED]
- Starting MySQL. [ OK ]
- [root@XXXX mysql]#
Tags: mysql-bin index’ not found
相关文章
- ·linux系统中清理MySql的日志文件mysql-bin.00000(2014-10-02)
- ·Linux关闭mysql日志与删除mysql-bin.0000*方法(2014-10-12)
- ·mysql删除mysql-bin.000xxx文件导致mysql无法启动解决方法(2014-11-24)
- ·解决mysql提示‘./mysql-bin.index’ not found (Errcode: 13) 的方法(2015-04-17)
- ·mysql删除数据提示Cannot delete or update(2014-09-24)
- ·解决Navicat cannot proceed because system tables办法(2014-09-24)
- ·mysql中null,not null,default,auto_increment详解(2014-10-02)
- ·PDO连接数据库提示could not find driver解决办法(2014-10-08)
- ·mysql中is not null和!=null及null介绍(2014-10-09)
- ·mysql远程连接 Host * is not allowed to connect to this MySQL server(2014-10-09)
- ·mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication(2014-10-13)
- ·mysql防止重复插入相同记录 insert if not exists(2014-10-17)
- ·Navicat 导出mysql数据库的时候出现 “Cannot proceed because system(2015-04-18)
- ·mysql提示service mysql3306 does not support chkconfig错误(2015-04-20)
- ·解决mysqlnd cannot connect to MySQL 4.1+ using the old insec(2015-04-20)
- ·mysql SELECT FOUND_ROWS()与COUNT(*)用法区别(2014-10-04)
推荐文章
热门文章
最新评论文章
- 写给考虑创业的年轻程序员(10)
- PHP新手上路(一)(7)
- 惹恼程序员的十件事(5)
- PHP邮件发送例子,已测试成功(5)
- 致初学者:PHP比ASP优秀的七个理由(4)
- PHP会被淘汰吗?(4)
- PHP新手上路(四)(4)
- 如何去学习PHP?(2)
- 简单入门级php分页代码(2)
- php中邮箱email 电话等格式的验证(2)