LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   mysql start up issue (https://www.linuxquestions.org/questions/linux-software-2/mysql-start-up-issue-4175441213/)

mjm295 12-12-2012 05:48 PM

mysql start up issue
 
After following this post http://vdachev.net/2007/02/22/mysql-reducing-ibdata1/ to shrink a 30Gb innodb I am having problem s starting mysql.

"service mysqld start" will not work

When I run the service mysqld start I get this in the log:
Code:

121212 19:43:19 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
/usr/libexec/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
121212 19:43:19 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
121212 19:43:19  InnoDB: Initializing buffer pool, size = 100.0M
121212 19:43:19  InnoDB: Completed initialization of buffer pool
121212 19:43:19  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.
121212 19:43:19 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

However:
su – mysql
cd /usr ; /usr/bin/mysqld_safe &
DOES WORK

This is on Red Hat EL6.3
mysql version 5.1
everthing under /var/lib/mysql is owned by mysql:mysql

Thanks in advance
Mark

mjm295 12-12-2012 05:55 PM

SOLVED - selinux was causing it:

restorecon -R /var/lib/mysql/
was the fix.

Mark


All times are GMT -5. The time now is 11:08 PM.