Retrieving a database
Posted by: shane-77 (---.bas512.cwt.btireland.net)
Date: May 21, 2018 02:58AM

Hi.
So after updating windows 10 this morning my laptop is now completely useless and needs a fresh install. Although I have backed up the majority of my sites I haven't backed up the sites I am currently working on. My laptop is going to the repair shop in the morning so they can retrieve all my files so I am wondering is there a way for me to salvage the databases I'm currently working on.

So if they copy the (wamp) htdocs folder to my harddrive is it possible for me to salvage my databases and install them back into localhost after a fresh install.

Thanks
Shane

N:B lots of people having problems with the latest windows 10 update be wary about updating



Edited 1 time(s). Last edit at 05/21/2018 03:00AM by shane-77.

Options: ReplyQuote
Re: Retrieving a database
Posted by: Otomatic (Moderator)
Date: May 21, 2018 09:23AM

Hi,

The only reliable and durable way to transfer databases is export/import using SQL files.

The databases are not in Wamp's www/mysite/ folder.

They are composed of folders located in the wamp/bin/mysql/mysqlx.y.z/data/ folder and it is not certain that the return of these folders will allow you to recover your databases.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons



Edited 1 time(s). Last edit at 05/21/2018 09:39AM by RiggsFolly.

Options: ReplyQuote
Re: Retrieving a database
Posted by: shane-77 (---.bas512.cwt.btireland.net)
Date: May 21, 2018 08:38PM

Thanks for the info.

I was resigned to the fact I would probably lose them alright. I do have the majority of the databases exported and backed up as sql files. I will lose a few sites though but I will chance copying the database folder into a fresh install and keep my fingers crossed for a bit of luck

Options: ReplyQuote
Re: Retrieving a database
Posted by: Otomatic (Moderator)
Date: May 21, 2018 09:02PM

Hi,

> copying the database folder into a fresh install
It must be exactly the same MySQL version that was used for the databases to recover.
Eventually, BEFORE copying your folders, install the right version of MySQL, it is not the MySQL addons that are missing !
See [wampserver.aviatechno.net]

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Retrieving a database
Posted by: RiggsFolly (Moderator)
Date: May 22, 2018 10:21AM

Hi

Remember WAMPServer can have multiple versions fo MySQL installed and you an switch between them.

All you need to do with WAMPServer 3+ is download a MySQL ADDON for the original version of MySQL, then you can replace he files as you say you are currently trying to do.
Once they are moved into the original MySQL version folder, switch to the old MySQL do a backup, then switch to the new version of MySQL and restore.

---------------------------------------------------------------------------------------------
(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: Retrieving a database
Posted by: Otomatic (Moderator)
Date: May 23, 2018 11:05AM

Hi,

A little more precision so that the recovery of your databases has more chances to succeed.
As RiggsFolly wrote, you must install the MySQL addon that exactly matches the old version of MySQL.
Then, after running Wampserver, you switch to this old version of MySQL to check that with the default options it works correctly.
You leave Wampserver, then you replace ALL the contents (folders and files) of the folder wamp/bin/mysql/mysqlx.y.z/data/ by the whole of the same folder recovered from your old disk and you launch Wampserver crossing your fingers so that everything works well.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote


Sorry, only registered users may post in this forum.