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.
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:
The magic was done!!!
I was able to solve this on OS X by shutting down the existing
mysql.server
that was running:The starting:
From there I could run
mysql.server restart
without throwing the ERROR.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..
If you get something like this, you are full..
In that case, you need to start looking for what to delete to make room, or add an additional drive to your server.
Run the below commands and it will work.
Go to terminal and type
I ended up figuring this out on my own.
In searching for my logs I went into
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
I then restarted mysql
I tested everything and it all works like a charm again!
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 SUCCESS!
My OS El Capitan 10.11.5