Why is Cpanel restarting all instances of Mysql

Mr. Bob

Member
Feb 25, 2003
5
0
151
Can someone tell me why Cpanel restarts ALL instances of MySql on the server when issuing a restart command from WHM??

Shouldn't it only restart the MySql instance associated with Cpanel?

This is rather annoying. My other MySql instances are completely separated from each other, each running under separate users - the only thing linking them together is that they reside on the same server.

If anyone can shed light on this it'd be GREATLY appreciated. Thanks.
 
Last edited:

mohit

Well-Known Member
Jul 12, 2005
553
0
166
Sticky On Internet
the mysql restart given in WHM is for restarting the mysql service on the server itself, its same as doing a mysql restart from ssh.

it says "restart Services" not "instances"
if you see a hung mysql process you should kill that particular from ssh or from whm-->Show Current CPU Usage.
 

Spiral

BANNED
Jun 24, 2005
2,018
8
193
Can someone tell me why Cpanel restarts ALL instances of MySql on the server when issuing a restart command from WHM??

Shouldn't it only restart the MySql instance associated with Cpanel?
You are clearly quite confused regarding MySQL ....

There is only ONE MySQL server and only one "instance" as you put it running on your server --- THERE IS NO OTHER!

You could not possibly be running more than one MySQL on the same server and that would be unreasonable to even consider that though you could have both MySQL and PostgreSQL together the same server but that's a different service.

What you are thinking of and incorrected referring to as "instances" is actually child process of your one single solitary running MySQL server.

When you issue a "restart" for MySQL whether that be from WHM or SSH or anywhere for that matter, you are telling the MySQL server itself to restart which means the database server and all it's sub process will go down temporary for the restart.

What you are talking about is something parallel to like trying to reboot your home computer and then complaining that your Excel spreadsheet goes down. Yes, it's going to do that. :D
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
80
458
cPanel Access Level
Root Administrator
Can someone tell me why Cpanel restarts ALL instances of MySql on the server when issuing a restart command from WHM??

Shouldn't it only restart the MySql instance associated with Cpanel?

This is rather annoying. My other MySql instances are completely separated from each other, each running under separate users - the only thing linking them together is that they reside on the same server.

If anyone can shed light on this it'd be GREATLY appreciated. Thanks.
The current design of cPanel only allows for one installation of MySQL on the server. Issuing a restart of MySQL using cPanel's tools will cause all running MySQL services to be terminated. As for the starting part, cPanel will use the init script ( usually in /etc/init.d ) to start the service. If all your MySQL installations are using the same init script that could be a/the problem.
 

Mr. Bob

Member
Feb 25, 2003
5
0
151
You are clearly quite confused regarding MySQL ....

There is only ONE MySQL server and only one "instance" as you put it running on your server --- THERE IS NO OTHER!

You could not possibly be running more than one MySQL on the same server and that would be unreasonable to even consider that though you could have both MySQL and PostgreSQL together the same server but that's a different service.

What you are thinking of and incorrected referring to as "instances" is actually child process of your one single solitary running MySQL server.

When you issue a "restart" for MySQL whether that be from WHM or SSH or anywhere for that matter, you are telling the MySQL server itself to restart which means the database server and all it's sub process will go down temporary for the restart.

What you are talking about is something parallel to like trying to reboot your home computer and then complaining that your Excel spreadsheet goes down. Yes, it's going to do that. :D
No, I'm not confused. You can run multiple MySQL installations not instances on the same server. I have cPanel running under 5.0.89 and the other install is 5.1.46. Completely different binaries. In most cases, a separate MySQL installation is not worth the increased overhead but I need it for a site that runs on bleeding edge software, in addition to a very specialized configuration.

The current design of cPanel only allows for one installation of MySQL on the server. Issuing a restart of MySQL using cPanel's tools will cause all running MySQL services to be terminated. As for the starting part, cPanel will use the init script ( usually in /etc/init.d ) to start the service. If all your MySQL installations are using the same init script that could be a/the problem.
Thanks. I will look at the init script again.
 
Last edited: