PDA

View Full Version : Restarting MySQL



wildjokerdesign
11-12-2003, 01:28 PM
I was wondering if anyone knew if when you restarted your VDS if it also restarted MySql. I am trying really hard to avoid SSH.. :)

jalal
11-12-2003, 02:25 PM
I would assume that restarting the VDS ran all the restart scripts in /etc/rc.d/init.d/
which includes mysql.

Don't fear SSH, feel the force!

wildjokerdesign
11-12-2003, 03:14 PM
I know I should not fear it but all the info seems to conflict to me. I was actually trying to help another user get the phpBB installed and when I went to install MySQL to support it I go this error.


Fail to execute command (INSERT INTO host
VALUES
('thier.com','mysql','Y','Y','Y','
','Y','Y','Y','Y','Y','Y')) Command add on
ValueApp failed.

So looking through the forum read something about restarting mysql but was not sure. I did restart thier VDS but it did not seem to make a diffrence. Still have not heard back from WestHost so I was trying to explore more.

jalal
11-12-2003, 03:58 PM
Looks like a permissions problem to me. You'll need Westhost for that methinks...

I assume you were installing MySQL through your new Reseller Manager???

wildjokerdesign
11-12-2003, 05:10 PM
Looks like a permissions problem to me. You'll need Westhost for that methinks...

I assume you were installing MySQL through your new Reseller Manager???

Yep I think maybe this one will take some WestHost magic!

No it was not my new Reseller Package it was just another client of WestHost that had asked for my help. It has been pretty interesting since it simply started out that they where haveing problems with thier old Matt Scripts bb board. I was tryingto convince them to switch to phpBB and had set up a test board on one of my accounts and did a bunch of mods to it. They liked it so I was going to move it over to their site and POOF!... I hit a road block... and I thought this was going to be a simple one.

The one thing I can say about it is that now I know alot more about php and how this board works... :) Have a feeling I will be learning even more shortly.

Thanks for your input on it Jalal... I was secretly hoping you would have the magic fix for me. :wink:

wildjokerdesign
11-19-2003, 11:45 AM
I would like to revisit this subject. The problem on the other clients site has been resolved but I have no idea how.

It is now happening on my test site which was most likely my fault. I screwed up the password trying to change if for one database. I decided to simply uninstall MySQL via the site manager and then re-install it. I know get the same error for my site when I try to install it. Most likely the un-install did not remove the old password or something. I sent a support ticket but thought I would see what others may think.

wildjokerdesign
11-19-2003, 03:53 PM
Just to update and to leave a chain of information for others. I recieved a response to my ticket from Kris Chatelian from Technical Support guideing me through the steps I needed to take.

Using SSH I logged in and stoped mysql using the following command typed in at the prompt:

/etc/rc.d/init.d/mysql stop

I then checked to see if any mysql processes where running:

ps aux

I made a mistake at this point. The results to this gave me a list of processes that where running and I thought that they where mysql processes so it used this code to stop the first in the list:

kill -9 pid The word pid I replaced with number listed with the first process on the list. Can anyone guess what happened? I shut down my SSH session. :) Ok lesson learned. I logged back in and got back to the same spot and took a closer look and figured out what I had done. So no mysql processes where running.

I then shut down my SSH session and went over to my FTP program and navigated to:
/var/lib/mysql Here you have two options. You can move this directory or you can delete. This will "uninstall" mysql. Kris suggested moveing it so that no data was lost but in my case I did not care about the data so I simply deleted it. (I had backed up my databases that I had there earlier so new I had them if I wanted them).

The rest was easy. Simply went in through my Site Manager and re-installed mySQL and the libraries and then phpMyAdmin. Now I am back in bussiness.

Hopefully this short little story will help some one else down the line.

CAUTION: I would like to say that the account I did this on is my test account so I had nothing to lose. I could have shut something down that would have stoped the site from displaying when I did the kill. So just be carefull and make sure you have backups of things and be ready to wait for a fix form WestHost if you mess something up really bad.

jalal, can you belive it? I finnally used SSH to acomplish something! Guess it is not that scary after all.

FZ
11-19-2003, 04:34 PM
Glad to hear you got it sorted out!


jalal, can you belive it? I finnally used SSH to acomplish something! Guess it is not that scary after all.

Do you see the power of SSH now? ;) This is just the beginning...

Oh, and if you do ever kill the wrong process, etc. you can always type restart at the SSH command prompt - and it will restart Apache and mySQL for you (even if they weren't running in the first place, e.g. if you had killed the wrong process).