-1

Im on CentOs v5.6 .When trying to start mysql im getting the following error

Starting MySQL. ERROR! Manager of pid-file quit without updating file.

In /var/log/mysqld.error.log i have the following

130319 03:39:04 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
130319  3:39:04 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
130319  3:39:04 [Warning] '--log' is deprecated and will be removed in a future release. Please use ''--general_log'/'--general_log_file'' instead.
130319  3:39:04 [Note] Plugin 'FEDERATED' is disabled.
^G/usr/sbin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
130319  3:39:04 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
130319  3:39:04  InnoDB: Initializing buffer pool, size = 8.0M
130319  3:39:04  InnoDB: Completed initialization of buffer pool
130319  3:39:04  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.
130319 03:39:04 mysqld_safe mysqld from pid file /var/lib/mysql/ip-10-144-82-28.pid ended

Please Help Thank You

1
  • Post the command you're executing. It seems to have some deprecated options. Plus it seems mysqld is lacking some permissions.
    – Bibhas
    Mar 19, 2013 at 8:27

3 Answers 3

0

Looking at the logs it appears like file permission issue -

"the error means mysqld does not have the access rights to the directory"

Check ownership of var/lib/mysql directory:

ls -ld /var/lib/mysql
drwxr-xr-x 8 mysql mysql 4096 Dec 11 12:34 /var/lib/mysql

Output MUST show "mysql mysql" ownership and atleast "drwxr-xr-x" (755) permission

If permissions are not correct, grant it:

chown mysql.mysql /var/lib/mysql
chmod 755 /var/lib/mysql

Then,

Uninstall RPM (Only when it is fresh installation, and you do not have any mysql data. If it is not fresh installation, do a rpm -Uvh instead) Remove all contents of /var/lib/mysql/ directory Re-install RPM check if /var/lib/mysql/mysql/plugin.frm is created after installing RPM

Then give a service mysql start and watch logs.

0

/usr/sbin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
130319 3:39:04 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.

make sure all your "mysql" db files are in /var/lib/mysql/mysql/ ... or just run mysql_upgrade -p[password]

130319 3:39:04 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'.

as stated earlier, mysql cannot write to the /var/lib/mysql/ibdata1 file.

make sure the user mysql is running as can write there.

0

If this is a Centos / RHEL or another distribution with selinux enabled that might be the culprit.

If that is the case disable selinux temporarily and see if it works.

echo 0 > /selinux/enforce

If SElinux is the problem, then you should monitor audit.log and make it work (check: MySQL 5.6 and SELinux are arguing)

You can also disable it permanently at /etc/sysconfig/selinux changing enforcing to either permissive or disabled.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .