mysql數據庫報錯:InnoDB: Operating system error number 13 in a file operation


環境:centos6.5 x86_64

啟動mysql發現日志報錯(日志路徑可以查看/etc/my.cnf的配置)


160722 10:34:08 [Note] Found 42570716 of 42570696 rows when repairing './yunva@002dlog/room_msg'

160810  0:54:00 [ERROR] /usr/libexec/mysqld: Sort aborted
160810 10:41:55 [ERROR] /usr/libexec/mysqld: Sort aborted
160810 16:41:43 [ERROR] /usr/libexec/mysqld: Sort aborted
160823 11:34:45 mysqld_safe Starting mysqld daemon with databases from /home/data
160823 11:34:46 [Warning] Can't create test file /home/data/plugin.lower-test
160823 11:34:46 [Warning] Can't create test file /home/data/plugin.lower-test
160823 11:34:46 [Warning] option 'innodb-additional-mem-pool-size': signed value 200 adjusted to 524288
160823 11:34:46  InnoDB: Initializing buffer pool, size = 128.0M
160823 11:34:46  InnoDB: Completed initialization of buffer pool
160823 11:34:46  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
160823 11:34:46 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
160823 11:45:30 mysqld_safe Starting mysqld daemon with databases from /home/data
160823 11:45:30 [Warning] Can't create test file /home/data/plugin.lower-test
160823 11:45:30 [Warning] Can't create test file /home/data/plugin.lower-test
160823 11:45:30 [Warning] option 'innodb-additional-mem-pool-size': signed value 200 adjusted to 524288
160823 11:45:30  InnoDB: Initializing buffer pool, size = 128.0M
160823 11:45:30  InnoDB: Completed initialization of buffer pool
160823 11:45:30  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.

InnoDB: Cannot continue operation.


發現系統啟動只有幾十分鍾,說明服務器剛被人重啟過,mysql服務無法啟動

百度了下可能是selinux引起的,getenforce 發現問enforcing

setenforce 0

並且修改配置/etc/sysconfig/selinux

SELINUX=disabled

問題解決


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM