File './mysql-bin.index' not found (Errcode: 13)

今天做一个mysql的备机,拷贝数据的过程出现了一点点权限问题,记录一下

数据copy完成之后启动备库
[root@localhost data]# /etc/init.d/mysql start
Starting MySQL (Percona Server).The server quit without upd[FAILED]D file (/tol/mysql/data/localhost.localdomain.pid).

查看错误日志
[root@localhost data]# cat localhost.localdomain.err 
140813 15:54:58 mysqld_safe Starting mysqld daemon with databases from /tol/mysql/data
140813 15:54:58 [Note] Flashcache bypass: disabled
140813 15:54:58 [Note] Flashcache setup error is : ioctl failed

/tol/mysql/home/bin/mysqld: File './mysql-bin.index' not found (Errcode: 13)
140813 15:54:58 [ERROR] Aborting

140813 15:54:58 [Note] /tol/mysql/home/bin/mysqld: Shutdown complete

140813 15:54:58 mysqld_safe mysqld from pid file /tol/mysql/data/localhost.localdomain.pid ended

mysql-bin.index文件存在,首先想到的就是权限的问题,查看果然是拷贝的过程中权限变了

[root@localhost data]# chown mysql:mysql ./*

[root@localhost data]# /etc/init.d/mysql start       
Starting MySQL (Percona Server)...The server quit without u[FAILED]PID file (/tol/mysql/data/localhost.localdomain.pid).

启动还是报错,报错如下:
[root@localhost data]# tail -20 localhost.localdomain.err 
140813 15:58:20 [Note] Flashcache bypass: disabled
140813 15:58:20 [Note] Flashcache setup error is : ioctl failed

/tol/mysql/home/bin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
140813 15:58:20 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
140813 15:58:20 InnoDB: The InnoDB memory heap is disabled
140813 15:58:20 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140813 15:58:20 InnoDB: Compressed tables use zlib 1.2.3
140813 15:58:20 InnoDB: Using Linux native AIO
140813 15:58:20 InnoDB: Initializing buffer pool, size = 1.0G
140813 15:58:20 InnoDB: Completed initialization of buffer pool
140813 15:58:20 InnoDB: highest supported file format is Barracuda.
140813 15:58:21  InnoDB: Waiting for the background threads to start
140813 15:58:22 Percona XtraDB (http://www.percona.com) 1.1.8-20.1 started; log sequence number 51744413276
140813 15:58:22 [Note] Recovering after a crash using mysql-bin
140813 15:58:22 [Note] Starting crash recovery...
140813 15:58:22 [Note] Crash recovery finished.
140813 15:58:22 [ERROR] /tol/mysql/home/bin/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
140813 15:58:22 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: './mysql/host.frm' (errno: 13)
140813 15:58:22 mysqld_safe mysqld from pid file /tol/mysql/data/localhost.localdomain.pid ended

[root@localhost data]# ls mysql/plugin.frm -l
-rw-rw---- 1 root root 8586 Jun 16 13:23 mysql/plugin.frm

这个是因为上面更改权限的命令少加了-R参数,对二级目录下的文件权限没有改所导致,重新改一下权限,启动成功
[root@localhost data]# chown mysql:mysql mysql/*
[root@localhost data]# /etc/init.d/mysql start            
Starting MySQL (Percona Server)..                          [  OK  ]


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23249684/viewspace-1250656/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/23249684/viewspace-1250656/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值