MySQL Forums
Forum List  »  Newbie

Moved datadir and now get: ERROR! The server quit without updating PID file
Posted by: Roman Shuvalov
Date: March 14, 2012 10:19AM

Hi, all,

VMWare workstation running CentOS 6.2 x64

I just have installed MySQL 5.5.21. It run just fine until I decided to move datadir to another disk. The following steps brought me to the problem:

#----------------------------------------

service mysql stop

#copied data folder to a "larger disk" keeping its permissions
cp -rp /var/lib/mysql /data

#created my.cnf
cp /usr/share/mysql/my-huge.cnf /etc/my.cnf

#edited /etc/my.cnf by adding datadir option into [mysqld] section.
...
[mysqld]
datadir=/data/mysql

...

#now starting the server
service mysql start

#getting error message
Starting MySQL.. ERROR! The server quit without updating PID file (/data/mysql/master.home.pid).

#---------------------------------------------

Error log (/data/mysql/master.home.err) is not updated- it’s in the same state as it was copied from the original location (/var/lib/mysql/master.home.err), it’s not touched at all. The latter is not touched either.

The permissions on both folders (/var/lib/mysql and /data/mysql) and their respective content are identical

If I comment datadir line in /etc/my.cnf file:

[mysqld]
#datadir=/data/mysql

the server starts successfully against its default datadir location (/var/lib/mysql). Sure enough!

I read through bunch of posts on this error here, but most say the problem is insufficient permissions on datadir for mysql, but, like I said - this is the first thing I ensured by using cp with -rp options, so does not seem permission is the cause...

I would appreciate any ideas from experts of this community.

Thank you,
Roman.



Edited 3 time(s). Last edit at 03/14/2012 10:26AM by Roman Shuvalov.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.