Lost MySQL database accidentally steps to recover

Asked By 10 points N/A Posted on -

What are the steps to be followed to recover database? Where will be the database basically dropped into? I am still learning the database and I recently dropped a database with good number of shopping data I had created. Searching everywhere for the way to recover but all went in vain. Can anybody help me in recovering database for me? Will the pages be still on disk and I could run some file recovery software? Is it easy or I should consult a profession in case the dropped database is of paramount importance?

Answered By 590495 points N/A #194236

Lost MySQL database accidentally steps to recover


In case you are storing any information in MySQL database that is very valuable to you that you don’t want to lose, it is important to create regular backups to avoid data loss. Assuming you already have phpMyAdmin installed since the majority of web providers use it, you can use it to create a backup of your MySQL database. Here’s how.

Start phpMyAdmin. Select your database from the list located on the left of the screen. Click Export. You should see a new screen after this that says “View dump of database” or something similar. In the Export section, click Select All to select all the tables in the database. In “SQL options” section, click the right options. After that, click “Save as” and the corresponding or equivalent compression option.

Click Go. You should see a dialog box on your screen prompting you to save the file locally. In case something went wrong and you need to recover your database, read on. Open phpMyAdmin then create a database with a suitable name. Once created, select it from the list located on the left of the screen.

If you want to rewrite the backup over an existing database, select the database name from the list, check all the boxes next to the table names, and then choose Drop to delete all existing tables in the database. Next, click SQL. You should see a new screen after this where you can enter SQL commands and or upload an SQL file.

Click on the browse button, navigate to the location of your database backup file, and then select it. Click on the Go button. This will then upload the backup database file, run some SQL commands, and then recreate your database.

Related Questions