Portal Home > Knowledgebase > Articles Database > MYSQL problems


MYSQL problems




Posted by lJeejOee, 10-10-2012, 05:14 PM
My site started randomly having problems today. It might be from last week when I was messing with the mysql.cnf file. This is the error on my site. Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) This is the error when I check the mysql status. ERROR! MySQL PID file could not be found! I was tring this method already but it's telling me the process id doesn't exist. Any help? "ps auxf | grep mysql" "If you get any MySQL process kill that process ID using kill -9 PID and then try to start MySQL." This is urgent my site has been down for awhile now. Last edited by lJeejOee; 10-10-2012 at 05:26 PM.

Posted by JumptoMedia, 10-10-2012, 05:34 PM
Your MySQL server is not running. Start your MySQL server.

Posted by lJeejOee, 10-10-2012, 05:35 PM
I tried that. I ended up ordering managed service from my host. He said I had 9 gigs of log files so nothing could work. He is fixing it now. Last edited by lJeejOee; 10-10-2012 at 05:41 PM.

Posted by JumptoMedia, 10-10-2012, 05:37 PM
The logs do not have anything to do with MySQL starting or stopping unless that partition is full.

Posted by SajanP, 10-10-2012, 05:39 PM
Also try and revert back to before you were messing what the config file? Exactly what did you change in the config file? Also, you say you tried to start the mysql server. What exactly happened when you tried? Did it start 'OK'? service mysql restart or service mysqld restart

Posted by lJeejOee, 10-10-2012, 05:44 PM
When I try to restart it says ERROR! MySQL server PID file could not be found! and then it just hangs there forever trying to start mysql. I already did the changes when I changed that file but maybe it corrupted the database? Yea I think he said the partition was full but he said he just fixed the problem. He said lighttpd was responsible for the logs but I still can't start mysql.

Posted by Mambug, 10-10-2012, 06:06 PM
I'm thinking it has to do with a bad configuration file. MySQL is failing to start due to an error in the conf file. Worst case scenario, can you back up your databases, and reinstall MySQL?

Posted by JumptoMedia, 10-10-2012, 06:07 PM
I assume this is a cPanel server or almost any other server if so remove all the content from /etc/my.cnf and try to restart it. If it works then it could be a configuration error but if you still get error then add (log=/var/log/mysql.log) without ( ) to your my.cnf, and see what error(s) you get.

Posted by lJeejOee, 10-10-2012, 06:20 PM
Can you give me the commands I use to remove the content? And won't removing the content be bad? Or will it replace the content with something else?

Posted by JumptoMedia, 10-10-2012, 06:23 PM
You are not removing the content permanently it is to figure out the problem. Enter (cp /etc/my.cnf /etc/my.cnf.backup) it will create a backup of my.cnf as my.cnf.backup. Then you can enter (nano /etc/my.cnf) and remove all the content from the file, and save it. Don't forget everything is without ( ).

Posted by lJeejOee, 10-10-2012, 06:27 PM
Well what if it is the problem? Then what is the solution? And I don't want to make things worse. I wouldn't know how to reverse it.

Posted by JumptoMedia, 10-10-2012, 06:28 PM
Hire a sysadmin to take a look then. I don't think it would cost you much considering it could be a small configuration issue.

Posted by lJeejOee, 10-10-2012, 06:31 PM
Are you available for this right now? My managed server guy seems to have just stopped responding to my tickets.

Posted by lJeejOee, 10-10-2012, 08:01 PM
Problem fixed. LayerSolutions fixed it for me.

Posted by TwineDev, 10-11-2012, 10:01 PM
So what ended up being the issue? Was it something in the configuration? If so, did you get a refund from your host for the managed service to delete log files (which seems like it didn't work). Also, now that you have had your scare, remember always to backup any configuration file before changing it, especially on a production server.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Sites not loading?! :( (Views: 819)


Language:

LoadingRetrieving latest tweet...

Back to Top Copyright © 2018 DC International LLC. - All Rights Reserved.