3

Some time ago MySQL stopped working on my server and I've only just got round to looking into it.

When I try and start it with

service mysqld start

I get

Starting MySQL.The server quit without updating PID file (/[FAILED]mysqld/mysqld.pid).

If I run

service mysqld restart

I get

MySQL server PID file could not be found!

My my.cnf file has the following:

pid-file = /var/run/mysqld/mysqld.pid

/var/run/mysqld is empty, so I run

touch /var/run/mysqld/mysqld.pid

and

chown -R mysql:mysql /var/run/mysqld

then try service mysqld restart again, and I get The server quit without updating PID file (/[FAILED]mysqld/mysqld.pid) again, and /var/run/mysqld is empty again.

So, I don't really know what to do next. I've read about 20 SO/SF answers and tried what they suggest too and I'm going round in circles. I have MySQL 5.5 installed via Custombuild through Directadmin.

MattRogowski
  • 151
  • 1
  • 1
  • 4
  • 4
    Verify `/var/run/mysqld` has the correct permissions. Then check the log files for MySQL to see what else is going on. – Gene Oct 09 '14 at 15:55

2 Answers2

2

In the end, what I had to run was:

chmod 0777 /var/lib/mysql/ib_logfile0
chmod 0777 /var/lib/mysql/ib_logfile1
chown -R mysql:root /var/lib/mysql

Then service mysqld start worked.

MattRogowski
  • 151
  • 1
  • 1
  • 4
1

Check for permissions on mysql folder. PID should automatically get created when you start the mysql service. What does the mysql error log say ?

Karthik K
  • 11
  • 1