MySQL - バージョンアップしたら起動できなくなった
Oracle にある RPM を使って MySQL を 5.6 にバージョンアップしてみた。
OSは CentOS 6.5。
起動してみると、エラーが。。。
# /sbin/service mysql start Starting MySQL.The server quit without updating PID file (/var/lib/mysql/xxxx.pid).
ログをみるとアクセス権でエラーがでているらしい。
2014-06-29 12:04:54 7ff0b67a6720 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. 2014-06-29 12:04:54 17628 [ERROR] InnoDB: os_file_get_status() failed on './ibda ta1'. Can't determine file permissions 2014-06-29 12:04:54 17628 [ERROR] InnoDB: The system tablespace must be writable ! 2014-06-29 12:04:54 17628 [ERROR] Plugin 'InnoDB' init function returned error. 2014-06-29 12:04:54 17628 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGI NE failed. 2014-06-29 12:04:54 17628 [ERROR] Unknown/unsupported storage engine: InnoDB 2014-06-29 12:04:54 17628 [ERROR] Aborting
といっても、アクセス権はあるし、mysqld_safe では起動するし。。。
で、調べてたら SELinux のでした。
# restorecon -R /var/lib/mysql
これで解決。
まぁ開発環境ならSELinux無効にしろって話なのですが。。。