Portal Home > Knowledgebase > Articles Database > mysql was off in my server for A few times!


mysql was off in my server for A few times!




Posted by Host5-Co, 11-16-2014, 04:16 PM
hello i have a vps with 13GB Ram all of my sites in this server shows the error of cant connect to database for A few times in day ! and when i used this command everything is ok ! service mysqld restart i think my config of this file (my.cnf) is not good ! what can i do to resolve this problem ?

Posted by Jutt, 11-16-2014, 04:22 PM
Is that a cPanel based Server. And have you checked MySQL Logs?

Posted by Host5-Co, 11-16-2014, 04:25 PM
no a DirectAdmin based sever no i dont check this log ! ( how i can check that ? )

Posted by Jutt, 11-16-2014, 04:28 PM
You should check the longs to know what is exactly causing the issue. I have never used DA, but give it a try. /var/log/myslqd.log

Posted by Host5-Co, 11-16-2014, 04:42 PM
the log of mysql in directadmin is in this file >> /var/lib/mysql/server.hostname.com.err i have a lot of errors in this file ! can you tell me a default config of my.cnf ? thanks a lot

Posted by Host5-Co, 11-16-2014, 05:08 PM
can anybody Help me ?

Posted by PCS-Chris, 11-16-2014, 05:49 PM
Paste the contents of your /etc/my.cnf here and we can advise if those are a good match to your server. Most of the example "optimized" MySQL configurations you will find on google will use more than the total amount of memory in your server before you reach your max_connections limit. So typically the kernel's OOM function will start killing off processes to remain stable, killing the MySQL process and that's when you have downtime.

Posted by Host5-Co, 11-16-2014, 06:12 PM
thanks a lot my config of my.cnf :

Posted by RRWH, 11-16-2014, 07:25 PM
my.cnf looks to be reasonable, but then again a config file without context is just a config file. If you can download/run tuning-primer.sh and also mysqltuner.pl and share the oputput of both here, along with the output of free -m and finally output of apachebuddy.pl as well we will have a reasonable picture and might be able to offer more suggestions.



Was this answer helpful?

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

Also Read
iptables not saving (Views: 735)


Language: