UK WEB HOSTING FORUM FOR DISCUSSION ON WEB HOSTING SERVICE AND SUPPORT
LINUX HOSTING WINDOWS HOSTING PACKAGES SHOPPING CART OSCOMMERCE ZEN CART AGORA
ECOMMERCE HOSTING ASP MSSQL FRONTPAGE HOSTING PHP MYSQL HOSTING DISCUSSION FORUM
CPANEL RESELLER HOSTING DEDICATED SERVER VPS HOSTING PLESK VIRTUOZZO
Quick Search
Your forum announcement here!

  UK Web Hosting | Dedicated Server Windows and Linux VPS Forum > Technical Support > VPS Hosting - Virtual Private Servers

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-01-2007, 19:33
new member
 
Join Date: Dec 2006
Posts: 8
Default REstartng MySQL automatically on Linux [url=http://www.eukhost.com/vps-hosting.php]VPS Hosting[/url]

Twice I have had to restart MySQL on my VPS Hosting - dynamic website hostings showing no connection to database, resolved by restarting.

If I am watching the website hostings I can do this manually from WHM, but this is no good for longerterm use - I can't be checking my website hostings every half hour for the rest of my life

1. Is there some command line way that I can test if MySQL is responding?

2. What is the command line command for restarting MySQL (not via WHM but via command line)?

Given both the above I could run a script from a cron job every 15mins or so which would restart MySQL if it is not responding.

Anyone got any ideas?

Thanks
__________________
Simon
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-01-2007, 21:04
Senior System Administrator
 
Join Date: Oct 2006
Posts: 151
Thumbs up solution

Hello,

1. You can give "mysql" command on the shell and if it shows following output (mysql prompt) then Mysql is working fine.
----------------------------------
root@test [~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 317435 to server version: 4.1.21-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>
----------------------------------

2. You can restart MySql using following commands :
# service MySQL Server restart
# /scripts/restartsrv mysql

Even you can add MySQL Server from "WHM >> Service Configuration >> Service Manager" which will monitor MySQL Server service and automatically restart it if it goes down.

Let us know if you need any further assistance. We will be glad to assist you.

Best Regards,
eUKShane
http://www.eukhost.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-01-2007, 21:58
new member
 
Join Date: Dec 2006
Posts: 8
Default

Quote:
Originally Posted by eUKShane View Post
Hello,
Even you can add MySQL Server from "WHM >> Service Configuration >> Service Manager" which will monitor MySQL Server service and automatically restart it if it goes down.
Ah, that sounds like the easiest answer!

Any other services you recommend for monitoring, i.e. does it add much load or risk any problems if I set it to monitor httpd as well?
__________________
Simon
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 08-01-2007, 00:29
Senior System Administrator
 
Join Date: Oct 2006
Posts: 151
Thumbs up

Hello,

We have a script which will monitor MySQL Server service and will automatically restart it if it goes down.

You can check the script at http://www.eukhost.com/forums/showth...=5744#post5744

Quote:
Does it add much load or risk any problems if I set it to monitor httpd as well?
Well, enabling the httpd service for monitoring won't create any Load or Risk anything on your VPS Hosting.


Best Regards,
eUKShane
http://www.eukhost.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 08-01-2007, 20:30
new member
 
Join Date: Dec 2006
Posts: 8
Default

Quote:
Originally Posted by eUKShane View Post
Hello,

We have a script which will monitor MySQL Server service and will automatically restart it if it goes down.

You can check the script at http://www.eukhost.com/forums/showth...=5744#post5744
Thanks

I notice that your script does email notification and so on, but other than that what is the difference between running that script and setting up monitoring of MySQL through WHM? i.e. which will be the more reliable way to keep MySQL running? And will there be a conflict if I do both?
__________________
Simon
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 08-01-2007, 22:07
Senior System Administrator
 
Join Date: Oct 2006
Posts: 151
Thumbs up solution

Hello,

Their is no exact difference between the script and setting up monitoring of MySQL through WHM, both will send you an email notification of the service restart attempt. As you were asking something from Shell (command prompt) that's why I had given you that script.

Yes, you can use both options at a time and their will be no conflict in between them. Just enable monitoring of MySQL through WHM as this facility is given by cPanel so we can say that it's more reliable way to keep MySQL running.


Best Regards,
eUKShane
http://www.eukhost.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 20:47.

 

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by Web Hosting 3.1.0
Copyright © 2001-2008, eUKhost.com. All rights reserved.

 
Site Map

VPS Hosting
VPS Hosting plans

Dedicated Server Hosting
Dedicated Server plans

Business Web Hosting
100% uptime Hosting

Cpanel Hosting
cPanel Shared Hosting

Reseller Hosting
Reseller Web Hosting

Windows Hosting
Windows Shared Hosting

Windows VPS

Windows VPS Hosting

Semi Dedicated Servers
Semi-Dedicated Hosting

Dedicated Server Mirroring
Dedicated Server Mirroring

Webhosting Knowledgebase
Frequently asked Questions

Web Hosting Blog
eUKhost Blog

Web Hosting Support
Support Helpdesk

UK Data Center
eUKhost Datacenter

Web Hosting Forum
eUKhost Forum

Support Tutorials
Online Flash Tutorials

Offsite Back-up Plans
Remote Backup Service

Customer Testimonials
eUK Customer Testimonials


knowledgebase articles

eUKhost.com Services

Pre-Sales Questions
Pre-sales FAQ's

Domain Names
Domain registration FAQ's

cPanel Hosting
cPanel Hosting FAQ's

Windows Web Hosting
Plesk Control Panel

Reseller Hosting
Reseller Hosting FAQ's

VPS Hosting
Virtual Private Server

Semi-Dedicated Servers
Semi-Dedicated FAQ's

Dedicated Servers
Dedicated Server Hosting


popular blog categories


Web Hosting
Website Hosting articles

UK Web Hosting
UK Hosting articles

Dedicated Server Hosting
Dedicated Server guidelines

VPS Hosting
VPS hosting articles

cPanel Hosting
cPanel Hosting articles

Linux Operating System
Linux Operating techniques

Windows Web Hosting
Windows plesk articles

Web Hosting
Web Hosting Service