Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MySQL goes down - How do you find root cause? 1

Status
Not open for further replies.

southbeach

Programmer
Jan 22, 2008
879
US
I have a WIN 2K3 running WAMP5 - This is not a real production server; it is my own server and I use it for hosting my hobby site and development.

For a while it worked great but for the past couple of months I have to reboot server to get MySQL to work.

It is getting to me and I feel that it is time I dump WAMP5 and install each server separately - Must I do this?

How can I identify what/why MySQL is going down?

Thank you all in advance for your input.

--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
 
Not a clue what WAMP5 is but
Does your server just lock up?
Do you log the MySQL calls?
Possible that a call to MySQL is invalid and the server cannot cope.
I have a similar problem with an apache server running perl, if I miss a speech mark in a script, the whole thing falls over.

Maybe we should take up knitting!



Keith
 
WAMP stands for Windows Apache, Mysql and PHP.

Its an all in one package, that has a handy installer that sets up and configures all 3 things to to work together.

Now to find the root of the cause, I would look in event viewer. if the mysql service is stopping for some reason there will likely be something about it there.

You can also try to use the Services panel, to find out if the Service has stopped, and start it again. Mainly so you don't have to restart the server every time.



----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
In the \Program Files\MySQL directory (or a subdirectory of it), there should be a file ending in ".err". This file normally only contains startup and shutdown messages, but in your case should also hold the cause. If the file does not exist, try checking the system log of win2K3.

+++ Despite being wrong in every important aspect, that is a very good analogy +++
Hex (in Darwin's Watch)
 
audiopro said:
Thanks for that vacunita, this programming lark is awash with acronyms and I keep looking them up.
Don't mention it, and just for completeness: there's also LAMP and MAMP. but I'm sure you can figure out what those stand for.



----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Looking at mysql_error.log file, I see
Code:
081027 11:25:38  InnoDB: Starting shutdown...
081027 11:26:04  InnoDB: Shutdown completed; log sequence number 0 25565740
081027 11:26:04 [Note] c:\wamp\mysql\bin\mysqld-nt.exe: Shutdown complete

081027 11:27:28  InnoDB: Started; log sequence number 0 25565740
081027 11:27:28 [ERROR] Do you already have another mysqld server running on port: 3306 ?
081027 11:27:28 [ERROR] Aborting

081027 11:27:28  InnoDB: Starting shutdown...
081027 11:27:38  InnoDB: Shutdown completed; log sequence number 0 25565740
081027 11:27:38 [Note] c:\wamp\mysql\bin\mysqld-nt.exe: Shutdown complete

081027 11:28:56  InnoDB: Started; log sequence number 0 25565740
081027 11:28:56 [Note] c:\wamp\mysql\bin\mysqld-nt.exe: ready for connections.
Version: '5.0.41-community-nt'  socket: ''  port: 3306  MySQL Community Edition (GPL)
081107 15:32:07 [Note] c:\wamp\mysql\bin\mysqld-nt.exe: Normal shutdown

081107 15:32:07  InnoDB: Starting shutdown...
081107 15:32:11  InnoDB: Shutdown completed; log sequence number 0 27320706
081107 15:32:11 [Note] c:\wamp\mysql\bin\mysqld-nt.exe: Shutdown complete

081107 15:33:19  InnoDB: Started; log sequence number 0 27320706
081107 15:33:19 [Note] c:\wamp\mysql\bin\mysqld-nt.exe: ready for connections.
Version: '5.0.41-community-nt'  socket: ''  port: 3306  MySQL Community Edition (GPL)

This really does not tell me much other than wonder why the shutdown. I will clear this file and check it before and after I experience the problem again.

Looking at the Event Viewer I see two errors, one is related to the one posted above where it asks if I had a 2nd MySQL running and the 2nd error simply said that it was aborting.

When I check at the Services, it is always running and trying to Stop/Start or Restart the service this way never gets it back up and running. I have to use the WAMP icon on the SysTray and that does not get it started either.

I do have MS-SQL running on the same server, will this cause a problem?

There is the possibility that I am not closing tables/DBs as I run queries within my PHP scripts. Would this cause MySQL to crash?

Thank you all for your help!


--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
 
Do you have 2 versions of mysql running on the same box, looks like you might have which would explian port 3306 being is use.
 
I do not have two of them running, well, not intentionally :)

I think that error comes from my attempts to restart the server.

I did remove and re-installed WAMP some time back - Cannot remember if I had this problem even before the upgrade. If I did, I was not paying as much attention to my box as my interest was else where.

Given your question, I will experiment with removing WAMP and installing it again ... Prior to installing, reboot and check for services ... make sure none of them are MySQL/WAMP related.

Thanks!




--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
 
MySQL cannot use port 3306 and therefore thinks another instance may be active. However, I can imagine that your firewall blocking port 3306 TCP will have the same effect.

You can test this by telnetting to that port. In a terminal window, type:
Code:
telnet 127.0.0.1 3306
If you get no answer, there is nothing running on that port.


+++ Despite being wrong in every important aspect, that is a very good analogy +++
Hex (in Darwin's Watch)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top