0

I am very sure that i didn't delete my database and noone else sits on my machine. Then how did i my database get deleted automatically? I had 10 tables in it :(. Infact 2 databases got deleted automatically. They are not being shown in mysql query browser. How can i recover my databases back? Is there any query which will help to show the logs to see if the delete schema command was actually fired in mysql? I am very much frustrated. Please help. The last time i saw these database alive was before 2 weeks and today they are no more.

4
  • 11
    Gnomes. Same thing happens to my socks in the dryer Commented Jul 23, 2010 at 12:07
  • Check your recycle bin; each database is a folder in the mySQL data directory so they may be there. I doubt, however, that these databases got deleted automatically by mySQL. Commented Jul 23, 2010 at 12:13
  • Hi Pekka, can you tell me where is the data directory? I can't find it in `C:\Program Files\MySQL\MySQL Server 5.1`. All i can see is lib,include,bin,share. Commented Jul 23, 2010 at 12:22
  • Finally i created my whole database again. I don't know how it got deleted. This time to be safe i took backup of my database instantly using mysqldump. I can't trust mysql anymore. Commented Jul 24, 2010 at 7:18

3 Answers 3

1

could be you are looking at them with a different user credentials that does not have sufficient privileges to see them?

What tool are you using to view them? command line, phpmyadmin etc?

Yes there are logs you can go through see here

Sign up to request clarification or add additional context in comments.

2 Comments

Hi PurplePilot, Yes this can be there. But now what do i do? All i can remember is username and password for the current account.
Hi PurplePilot, when i do Select * from mysql.user i see only two users one is 127.0.0.1 whose password is blank and another is localhost whose password is which i am using just now. Does that mean the databases are sure to have been deleted?
1

Your database is not deleted from MySQL. You would have set your own user and password in user table when you created these tables. However the when You open my SQL it takes root as the user by default and password as NULL. So to fix it and to see your database and tables you need to set your username and password in config file of MySql.

Example:- If your username and password is XYZ you need to set them as below in config file(config.inc). path for this file would be:-C:\wamp\apps\phpmyadmin4.1.14 (depending on the version you have installed)

$cfg['Servers'][$i]['user'] = 'XYZ';
$cfg['Servers'][$i]['password'] = 'XYZ';

Comments

-1

We had similar problem where we lost all the tables of the database but the database remains as it is in the mysql. The problem and the solution is as follows:

  1. Check where you have installed your MYSQL/XAMPP/WAMP
  2. Check whether you have all the permissions to install the MYSQL/XAMPP at the place where you have installed your XAMPP/MYSQL on your desktop/server.

The solutions is simple, just re-install your XAMPP/MYSQL on your desktop/any other location where you have permission to install. Your will not get this problem in future. Please do not forget to check your error logs and take necessary actions after checking logs daily.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.