mySQL suddenly stopped. Privilege tables error.

Problems with the Linux version of XAMPP, questions, comments, and anything related.

mySQL suddenly stopped. Privilege tables error.

Postby gemdesign » 15. August 2006 10:33

Hi everybody
I need some advice here. I've got a Fedora server running Xampp 1.4.9a which has been fine for a long time. Suddenly a couple of days ago mysql stopped and I can't get it to start again.

When I check the localhost.localdomain.err file I find this error:

Code: Select all
060815 06:18:09  mysqld started
060815  6:18:11 Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist
060815  6:18:11 Aborting

060815  6:18:11 /opt/lampp/sbin/mysqld: Shutdown Complete

060815 06:18:11  mysqld ended


Any suggestions? Do you know what might have happend?
It would be great if you could answer in english, but I also understand some german - since I'm norwegian myself :)

Thanks.
gemdesign
 
Posts: 5
Joined: 15. August 2006 09:58

Postby Wiedmann » 15. August 2006 11:12

Someone have killed this table, db...

Are there some files left in the driectory for the database 'mysql'?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby gemdesign » 15. August 2006 12:28

Thank you for replying quickly.

In /opt/lampp/var/mysql/mysql there are no files, but in /opt/lampp/var/mysql i see all my databases as directories containing files:

ie database "contacts" contain:
contacts.frm contacts.MYD contacts.MYI

There are also a bunch of files called localhost-bin.001 - 087 in there.

I also noticed that all these files are owned by nobody/nobody. Shouldn't they be owned by root or mysql?
gemdesign
 
Posts: 5
Joined: 15. August 2006 09:58

Postby Wiedmann » 15. August 2006 13:00

In /opt/lampp/var/mysql/mysql there are no files,

Then someone have killed this db :-(

Simply restore this database (directory) from your backup.

And of course:
Change your passwords and have a look on your scripts (e.g. sql injections...)
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby gemdesign » 15. August 2006 13:05

Is this a database that mysql needs to run? Cause it is not a database that I have used on my website at all. I do not think I have a backup of it, just my website databases.

Is there some other way I can make mysql run?

Since I got all the files in the data directory I should be able to restore all my database tables that I need if I can get mysql running again.
gemdesign
 
Posts: 5
Joined: 15. August 2006 09:58

Postby Wiedmann » 15. August 2006 13:08

Is this a database that mysql needs to run?

Yes.

Is there some other way I can make mysql run?

Restore this special database ;-)

I do not think I have a backup of it, just my website databases.

The initial version you can get from the XAMPP archive.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby gemdesign » 15. August 2006 13:15

Allright, thank you very much for your fast replys :) I'll give it a try an let you all know how it goes!
gemdesign
 
Posts: 5
Joined: 15. August 2006 09:58

Postby gemdesign » 16. August 2006 11:10

Hi again. I got it fixed. Downloaded the package from the archive and re-uploaded the files. Changed all passwords and ran "lampp security" to set new passwords for the mysql users.

Now I'll take a look at my scripts and upgrade some opensource systems, but I probably should upgrade xampp as well.

Would it be a difficult task to do that from 1.4.9a?
gemdesign
 
Posts: 5
Joined: 15. August 2006 09:58


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 59 guests