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.

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.3 32 bit - Apache 2.4.33 - PHP 7.2.6/7.1.18/7.0.30/5.6.36 - MySQL 5.7.22 - MariaDB 10.3.7
Wampserver 3.1.3 64 bit - Apache 2.4.33 - PHP 7.2.6/7.1.18/7.0.30/5.6.36 - MySQL 5.7.22 - MariaDB 10.3.7
PhPMyAdmin 4.8.0.1 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »



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]

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.3 32 bit - Apache 2.4.33 - PHP 7.2.6/7.1.18/7.0.30/5.6.36 - MySQL 5.7.22 - MariaDB 10.3.7
Wampserver 3.1.3 64 bit - Apache 2.4.33 - PHP 7.2.6/7.1.18/7.0.30/5.6.36 - MySQL 5.7.22 - MariaDB 10.3.7
PhPMyAdmin 4.8.0.1 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

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.1.3 32bit & 64bit)
<Apache 2.4.29/2.2.31> <PHP 7.2/7.1/7.0/5.6/5.5/5.4> <MySQL 5.7.19/5.6.39/5.5.28>
<MariaDB 10.2.14> <phpMyAdmin4.8.1> <MySQL Workbench 6.3.10>

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 MySQL 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.

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.3 32 bit - Apache 2.4.33 - PHP 7.2.6/7.1.18/7.0.30/5.6.36 - MySQL 5.7.22 - MariaDB 10.3.7
Wampserver 3.1.3 64 bit - Apache 2.4.33 - PHP 7.2.6/7.1.18/7.0.30/5.6.36 - MySQL 5.7.22 - MariaDB 10.3.7
PhPMyAdmin 4.8.0.1 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote


Sorry, only registered users may post in this forum.