Page 1 of 1

"Couldn't start mysql" and it doesn't tell me why!!

PostPosted: 23. September 2012 12:25
by matteosistisette
Hi,

I have increased the innodb_buffer_pool_size and a couple of other parameters in my.cnf and when I try to restart xampp, it says "Couldn't start MySQL".
I am guessing this is because there is not enough available memory. However, no one should ever have to guess. When any of mysql, apache, or php can't be started, the exact error should be shown. If the error can't be shown, clues must be given to the user as to what log files to look at to find the cause of the issue.

Now, this was the bug report.
I also have a question, which is: is there, and if so where is, a mysql log file where I have some chance to find this error logged?

thanks
m.

Re: "Couldn't start mysql" and it doesn't tell me why!!

PostPosted: 23. September 2012 17:03
by JonB
I'm sorry to say 'that' is not a bug - that is a lack of knowledge. A 'BUG' is when a properly configured piece of software actually does not function, crashes due to coding errors, or returns an inconsistent result. :idea:

The way 'I' learned how lampp works was to go perusing through the /opt/lampp folders. It did not take long to discover there was a hierarchy of things that mirrored the general organization of a Linux server. All that said - *nix operating systems and programs that get installed do things is a fairly standard manner.

/bin & /sbin - binary executable objects
/etc - settings and configurations
/lib - code libraries (extenders)
/var - data

So looking in /var, we find the /mysql folder - and all your databases + the error log for that server. Probably localhost.localdomain.err. :)

this Google Search: "where does mysql place the error log"

Yielded these two exactly correct response for all versions of XAMPP/LAMPP - as there is not an error log entry in my.cnf.

http://dev.mysql.com/doc/refman/5.5/en/error-log.html

http://www.databasejournal.com/features ... L-logs.htm

When I wanted to know how lampp (its actually a bash script) itself executed, I opened it in a programmers editor - geany. The lampp script is an amazing piece of work. :shock:

If you want to learn how things work - examine them.


Good luck with your project.
8)

Re: "Couldn't start mysql" and it doesn't tell me why!!

PostPosted: 23. September 2012 17:27
by matteosistisette
Thank you for the reply, the information, and the suggestions.

I agree that the lampp script is an amazing piece of work and I agree I need to learn more about mysql, lampp, among a lot of other things.

However, neither of these excludes that what I pointed out is, in my opinion, a bug. Not the fact that mysql didn't start in this case (that was because of an error in my configuration and I was sure of that from the very beginning), but the fact that the script which attempts to start mysql and fails to start it, doesn't report any information on the source of the error.

You may call it a missing feature (reporting the cause of the failure when starting one of the servers fails) but when a very basic and obvious feature is missing I call it a bug.
"Couldn't start mysql" is not enough.
"Couldn't start mysql: error bla bla bla", or "Couldn't start myql: erroc code XXX" would be OK.
If that is not possible (which I doubt; actually in the worst case the script could even automatically do a tail of the error log), this:
"Couldn't start mysql: see var/mysql/whatever.log for more information"
would avoid having to google around to figure out the location of the logs.

Thanks
m.

Re: "Couldn't start mysql" and it doesn't tell me why!!

PostPosted: 23. September 2012 18:03
by JonB
Time to learn 'webmin'... the Swiss Army Knife of *nix (its only missing the Victorinox label - oh - and its icons are not maroon ). Otherwise its the deal - cron access, backups, MySQL administration, file system access and file editing, administration of 'other servers' such as Apache, MySQL, ProFTPd, various mailservers (daemons) the list goes on and on. "Plier, Screwdriver(s), Saw-blade, Ice Pick, Knife, Corkscrew, Bottle-Can-opener & Mini-torch" :mrgreen:

Webmin used to be part of the lampp install. Its the standard tool for Unix & Linux administrators.

http://www.webmin.com/

You will have to integrate it manually, but it does almost anything a Unix administrator needs to do completely on its own port (10000). Its actually a server-in-itself, as long as your Unix server boots and can connect to the internet (or via localhost) - it does not matter if Apache, FTP or MySQL are in smoking ashes - you can still fix things. Many Linux distributions have installer driven versions in their Repo's

There even a forum for it here (up above). I have never used that forum, so I can't speak to its activity.

Good Luck
8)

Re: "Couldn't start mysql" and it doesn't tell me why!!

PostPosted: 23. September 2012 19:23
by matteosistisette
Thank you for the suggestion.

For managing the real online server (not the local one with xampp) I gave webmin a quick try (way too quick to get an idea) and it looked to me a little bit too low-level for my needs - meaning that you do things through a GUI instead of a command line but you still need to know what are the right settings for everything. Which is certainly great for experienced administrators because it's powerful and flexible.

So now I'm looking at OpenPanel instead....