recover database
Posted by: soundar (223.30.70.---)
Date: September 25, 2015 08:35AM

in my system working with wamp server 2,i had a some problem in wamp,so im uninstalled the wamp and install the same version again...real problem is im trying to recover the database from old wamp path..
i copied old data from this path c:\wamp\bin\mysql\mysql5.6.12 and past it new path D:\wamp\bin\mysql\mysql5.6.12 after restart wamp and going to start phpmyadmin it shows only the DATABASE AND TABLE
NAMES.It does not display the fields of the table vlaue..please help me how can get the fields of my database..please reply as soon....
thanking you



Edited 1 time(s). Last edit at 09/25/2015 09:26AM by Otomatic.

Options: ReplyQuote
Re: recover database
Posted by: RiggsFolly (---.as43234.net)
Date: September 25, 2015 10:15AM

Hi soundar,

So I guess you did not take a backup of your databases before you uninstalled the old WAMPServer?

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: recover database
Posted by: soundar (223.30.70.---)
Date: September 25, 2015 10:43AM

yes sir

Options: ReplyQuote
Re: recover database
Posted by: RiggsFolly (---.as43234.net)
Date: September 25, 2015 10:51AM

Yes I do have a backup? or No I do not have a backup?

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-



Edited 1 time(s). Last edit at 09/25/2015 11:15AM by RiggsFolly.

Options: ReplyQuote
Re: recover database
Posted by: soundar (223.30.70.---)
Date: September 25, 2015 11:22AM

No I do not have a backup?

Options: ReplyQuote
Re: recover database
Posted by: RiggsFolly (---.as43234.net)
Date: September 25, 2015 12:25PM

Well I guess you have learned an expensive but valuable lesson.

What files were left in your old wamp install in the `c:\wamp\bin\mysql\mysql5.6.12 \data` folder?

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-



Edited 1 time(s). Last edit at 09/25/2015 12:26PM by RiggsFolly.

Options: ReplyQuote
Re: recover database
Posted by: soundar (223.30.70.---)
Date: September 25, 2015 12:37PM

In c:\wamp\bin\mysql\mysql5.6.12 \data in folder have my database name folder and performance_schema and my sql folder and test folder.and some index files also apper.

Options: ReplyQuote
Re: recover database
Posted by: RiggsFolly (---.as43234.net)
Date: September 25, 2015 01:18PM

Was you database a MYISAM database or an INNODB database?

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: recover database
Posted by: soundar (223.30.70.---)
Date: September 25, 2015 01:48PM

SORRY I DONT KNOW, HOW TO FIND MYISAM database AND INNODB database TYPE IN WAMP FOLDER?

Options: ReplyQuote
Re: recover database
Posted by: RiggsFolly (---.as43234.net)
Date: September 25, 2015 02:09PM

Well you created the database. So did you create the tables as MYISAM or INNODB

MYISAM tables get placed in a subfolder of \wamp\bin\mysql\mysql5.6.12\data in a folder with the same name as the database.

INNODB tables, by default, get placed in a file called \wamp\bin\mysql\mysql5.6.12\ibdata1


If your database is MYISAM and the version of MySQL has not changed, you shoudl be able to copy the folder

C:\wamp\bin\mysql\mysql5.6.12\data\{database_name} to D:\wamp\bin\mysql\mysql5.6.12\data\{database_name}

Then restart MySQL and with luck the database will be seen by MYSQL. Although any Userid/passwords you may have created and permisions will be lost. But thats not to difficult to re-create.


If some of the tables of your database where INNODB you can try copying that file also

Stop the MySQL service

COPY C:\wamp\bin\mysql\mysql5.6.12\data\ibdata1 to D:\wamp\bin\mysql\mysql5.6.12\data\ibdata1

Delete D:\wamp\bin\mysql\mysql5.6.12\data\ib_logfile0
and D:\wamp\bin\mysql\mysql5.6.12\data\ib_logfile1

Delete any D:\wamp\bin\mysql\mysql5.6.12\data\mysql-bin.* files

Restart the MySQL service


And hope that MYSQL will see the database and all its tables.


Otherwise you have lost your database

In the furture there is a post that tell you how to do these things without risking the loss of any data, here [forum.wampserver.com]

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: recover database
Posted by: soundar (223.30.70.---)
Date: September 29, 2015 10:33AM

sorry for late.... i think my database MYISAM ..after replace the data folder old to new installation path..its only display the database names...not the values

Options: ReplyQuote
Re: recover database
Posted by: RiggsFolly (---.as43234.net)
Date: September 29, 2015 11:30AM

I think its probably a INNODB database then

If the database was called `test` you will have a folder `C:\wamp\bin\mysql\mysql5.6.12\data\test`
If its a INNODB database :
you will see in that folder one file per table name called `tablename.frm` plus one extra file called `db.opt`

If it is a MYISAM database :
you will see more file types, for each table you will see `tablename.frm` and `tablename.MYD` and `tablename.MYI` and a single `db.opt` file.

Which type of database do you think it is now?

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: recover database
Posted by: soundar (223.30.70.---)
Date: October 01, 2015 06:57AM

Yes Sir i caught that i have INNODB Database..

Options: ReplyQuote
Re: recover database
Posted by: RiggsFolly (---.as43234.net)
Date: October 01, 2015 09:44AM

Well if this does not work


Stop the MySQL service

COPY C:\wamp\bin\mysql\mysql5.6.12\data\ibdata1 to D:\wamp\bin\mysql\mysql5.6.12\data\ibdata1

Delete D:\wamp\bin\mysql\mysql5.6.12\data\ib_logfile0
and D:\wamp\bin\mysql\mysql5.6.12\data\ib_logfile1

Delete any D:\wamp\bin\mysql\mysql5.6.12\data\mysql-bin.* files

Restart the MySQL service

You have lost your database

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: recover database
Posted by: JeremyBenson11 (---.pppoe-dynamic.High-Speed.nb.bellaliant.net)
Date: October 03, 2015 10:33PM

I keep exports of my DB whenever I make a new table. Should always back up on a thumb drive. Doesn't hurt to send backedup site files, and db to your gmail either. It's professional, and keeps you safe. Could you imagine if Facebook just shut down cuz the guys like, oh, I didn't make a backup... No way, would never happen. People know to backup files. It's common sense tongue sticking out smiley

Options: ReplyQuote
Re: recover database
Posted by: RiggsFolly (---.as43234.net)
Date: October 04, 2015 01:34AM

Thanks Jeremy

Not exactly a solution, BUT GOOD ADVICE non the less

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote


Sorry, only registered users may post in this forum.