Page 1 of 1

MySQL not starting. Please help!

PostPosted: 10. September 2011 10:23
by luismartin
Hi, even though I'm new to this forum, I've been using XAMPP for years.

It never gave me any important trouble, as I can recall. Now I'm stumped because something is blocking mysql to start. When I press the Mysql Start button, the green message "Running" appears, but in less than a second it's gone.

I've checked all the running processes in the Task Administrator, and no process including the text "mysql" is being executed. I've also checked the Services manager, but there is only one service called MySQL_ZendServer51, which was supposedly installed by some PHP IDE, and it's stopped, and it has manual setup to be executed. I also unistalled XAMPP, downloaded last version (1.7.4) and installed it, keeping the htdocs and mysql folders.

So, what else could I do without uninstalling the IDE's? (I've got too many installed: Netbeans, PHPDesigner the ones I use, and a few more).

Re: MySQL not starting. Please help!

PostPosted: 10. September 2011 14:11
by JonB
Two things -

What Windows version are we talking about ?

and, well - here's a thought -

look in \xampp\mysql\data\mysql_error.log

:shock:

Re: MySQL not starting. Please help!

PostPosted: 10. September 2011 15:09
by luismartin
Hello and thanks for replying.
I'm using Windows Vista, and I've just checked that log file and all the entries were made in 2010. None of this year.

Re: MySQL not starting. Please help!

PostPosted: 10. September 2011 15:21
by JonB
when was the last time MySQL worked correctly?

something is definitely wrong, as that log should be written to. Its also possible that one of our toys has co-opted the error output.

look in your my.ini (or my.cnf, if you do not have a my.ini) at the value of -> log_error=

that should tell you where MySQL is logging to.

Good Luck
8)

Re: MySQL not starting. Please help!

PostPosted: 11. September 2011 22:08
by luismartin
Hi JonB, and thanks, that line points to mysql_error.log

Now I've seen something in this file:
110911 22:51:27 [ERROR] Fatal error: Can't open and lock privilege tables: Incorrect key file for table 'user'; try to repair it

I'm fearing that it doesn't have a quick fix, does it? :roll:

Re: MySQL not starting. Please help!

PostPosted: 12. September 2011 13:36
by JonB
Hello Luismartin

I would not give up hope at all.

There are several issues/related questions really -

A. Do you have a backup of any sort that was created prior to the problem?

B. Did you create users other than 'root' or the phpMyAdmin control user to woth with your scripts/applications?

C. If "B" is true - do you know the 'names' of those users?

It almost certainly will be possible to recover your system. Its really a matter of 'how simple id the fix'?

Good Luck
8)

Re: MySQL not starting. Please help!

PostPosted: 12. September 2011 15:19
by luismartin
Hello again JonB,

yes, I remember I was adding/changing some privileges on localhost lately. Although I think I don't have a backup of all my local databases. I hope this is not a big problem. I read somewhere else, after googling the error line, that somebody fixed this by unistalling and installing a prior version of XAMPP, which did work, then doing a backup of all his databases, then deleting the mysql directory, unistalling XAMPP and reinstalling the latest version. But if there is something quicker I will try it first.

Re: MySQL not starting. Please help!

PostPosted: 12. September 2011 16:37
by JonB
luis -

you did not answer B or C
Did you create users other than 'root' or the phpMyAdmin control user to woth with your scripts/applications?

that is the important issue here.

Just answer that question - and I can make a recommendation. You may not need to re-install.

8)

Re: MySQL not starting. Please help!

PostPosted: 12. September 2011 21:29
by luismartin
JonB wrote:luis -

you did not answer B or C
Did you create users other than 'root' or the phpMyAdmin control user to woth with your scripts/applications?

8)


ok hehe,
yes, I had other users to work with, and I know their names. At least the ones I used lately. Not sure if all of them though. :oops:

Re: MySQL not starting. Please help!

PostPosted: 13. September 2011 08:21
by luismartin
What should I do then?

Re: MySQL not starting. Please help!

PostPosted: 13. September 2011 08:52
by luismartin
At this moment I have downloaded the previous version 1.7.3 and installed it. MySQL works again. I couldn't wait. :oops:

Now I'm not really sure if export everything, delete the /mysql folder, reinstall version 1.7.4, and import the exported databases, since this version is working and I am not 100% sure that it will fix the error.

Advice?

Re: MySQL not starting. Please help!

PostPosted: 13. September 2011 13:34
by JonB
the thing to do would be to fire up phpmyadmin, and see what has become of your users and data :shock:

AND TO LEARN HOW TO BACKUP YOUR MYSQL

:)

Re: MySQL not starting. Please help!

PostPosted: 23. September 2011 21:08
by Xiuzz
And what solution would you advise for backing up? Is it possible to do this with Nero? (Sorry, I'm a total lamer)

Re: MySQL not starting. Please help!

PostPosted: 23. September 2011 22:18
by JonB
MySQL is a database management system - both an engine, its metadata, and the actual datafiles

Although you can back up the whole XAMPP folder, its not really the same thing as doing a MySQL backup.

you can use phpMyAdmin select the database you want - then select the Export tab - outputs to .sql file by default (which you can then Import back.

OR learn to use the CLI - mysqldump.exe (uses parameters from the Windows CMD line

OR use MySQL Workbench (free) from MySQL/Oracle - includes Database admin and backup - is a Windows/Linux/Solaris/Mac standalone application -

http://wb.mysql.com/

See this for more:
http://bravo.newnetenterprises.com/word ... -outcomes/

Good Luck
8)