Home » Mysql » ERROR! MySQL manager or server PID file could not be found! QNAP

ERROR! MySQL manager or server PID file could not be found! QNAP

Posted by: admin November 1, 2017 Leave a comment


I am having an issue where MySQL isn’t starting on my QNAP NAS.

I found this first by not being able to log in through phpMyAdmin – was getting error:

#2002 Cannot log in to the MySQL server

I then went to attempt to start mysql, as I guess this is a common issue with this, but it just gave a generic error.

I went through troubleshooting the mysql.sock file and everything, changing its permissions, but nothing is working.

I have rebooted my NAS many times.

I eventually tried to restart mysql. In doing so I get:

ERROR! MySQL manager or server PID file could not be found!

I can’t find anything specific to the QNAP or any general type troubleshooting for this. Everything I find seems to be OSX related.


After a lot of searching, I was able to fix the “PID file cannot be found” issue on my machine. I’m on OS X 10.9.3 and installed mysql via Homebrew.

First, I found my PID file here:


Next, I located my my.cnf file here:


Finally, I added this line to the bottom of my.cnf:

pid-file = /usr/local/var/mysql/{username}.pid

Hopefully this works for someone else, and saves you a headache! Don’t forget to replace {username} with your machine’s name (jeffs-air-2 in my case).


I tried everything above, but saw no results until I got a hint from here: https://superuser.com/questions/159486/how-to-kill-process-in-mac-os-x-and-not-have-it-restart-on-its-own

I eventually went over to the activity monitor in my Mac, force Quit the PID, and ran the command:

sudo /usr/local/mysql/support-files/mysql.server restart

The magic was done!!!


If you have installed MySQL using brew the best way to go would be with homebrew

brew services restart mysql

after you run that command, all the problems that the update generated will be resolved


I ended up figuring this out on my own.

In searching for my logs I went into

cd /usr/local/mysql/var

In there I found the file named [MyNAS].pid (replace [MyNAS] with the name of your NAS.

I then ran the following to remove the file

rm -rf /usr/local/mysql/var/[MyNAS].pid

I then restarted mysql

[/usr/local/mysql/var] # /etc/init.d/mysqld.sh restart        
Try to shutting down MySQL
ERROR! MySQL manager or server PID file could not be found!
Starting MySQL. SUCCESS! 

I tested everything and it all works like a charm again!


just run mysqld (don’t run as root) from your terminal, you’re mysql server will restarts and resets everything like show in the picture:

enter image description here

and use:

mysql -u root -h


I had the same issue. It turns out I added incorrect variables to the my.cnf file. Once I removed them and restarted mysql started with no issue.


Check if your server is full first, thats a common reason (can’t create the PID file because you have no space). Run this to check your disk usage..

df -h

If you get something like this, you are full..

Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        40G   40G  6.3M 100% /

In that case, you need to start looking for what to delete to make room, or add an additional drive to your server.


ERROR! MySQL server PID file could not be found!

This might be due to issues with disk space, disk inode usage or innodb corruption which may lead to the error.

The issue was with the pid file and the solution was:

  1. SSH login to server as a root

  2. Create directory /var/run/mysql

mkdir /var/run/mysql

3) Create a file with name as mysqld.pid

touch mysqld.pid

  1. Change its ownership and group to mysql:mysql

    chown mysql:mysql mysqld.pid

  2. Restart MySQL service



I have the same problem. I found the file {username}.local.err instead {username}.local.pid inside the /usr/local/mysql then i change the name *.err for *.pid and work fine.
Starting MySQL

My OS El Capitan 10.11.5


Run the below commands and it will work.

Go to terminal and type

sudo chown -RL root:mysql /usr/local/mysql

sudo chown -RL mysql:mysql /usr/local/mysql/data

sudo /usr/local/mysql/support-files/mysql.server start


I was able to solve this on OS X by shutting down the existing mysql.server that was running:

mysql.server stop

The starting:

mysql.server start

From there I could run mysql.server restart without throwing the ERROR.