Pages: 12Next
Current Page: 1 of 2
Transferring Databases
Posted by: CyberSpud (---.dsl.pipex.com)
Date: August 14, 2016 05:42PM

Something very strange happened to my Wampserver install and it seemed to have uninstalled itself leaving my database folders intact in C:\wamp\bin\mysql\mysql5.6.17\data but nothing much else. The desktop icon had gone and there was no entry in "Programs and Features". The only warning I had was that a command window suddenly popped up, I briefly saw the word SQL and then the window vanished. I then noted the program was missing. This happened a few weeks after upgrading my laptop to Windows 10 but I can't see this being the issue as I haven't run Wampserver for about 2 months.

I have now installed the latest version of Wampserver and I need to transfer my databases over the new mysql setup. They are currently stored in folders in C:\wamp\bin\mysql\mysql5.6.17\data. I have tried just copying the folders to the new directory but they are not being properly recognised in phpmyadmin. Unfortunately, I can't just import the databases in as I didn't export them to .sql format before this issue happened.

Is there a way of getting them into mysql? There is one folder for each database and each folder contains a file called .frm and called .ibd for each table if that helps..

Options: ReplyQuote
Re: Transferring Databases
Posted by: Otomatic (Moderator)
Date: August 14, 2016 06:14PM

Hi,

> They are currently stored in folders in C:\wamp\bin\mysql\mysql5.6.17\data.
Under MySQL versions of [wampserver.aviatechno.net] in it is noted:
Important Reminder: The transfer of databases between different versions of MySQL should be performed by EXPORT / IMPORT of SQL files using phpMyAdmin or a similiar tools of your choice.
Do not copy the data folder between different versions of MYSQL. Databases from different versions of MYSQL are VERY unlikely to be compatible! You will also destroy the version of MYSQL that you copied the data folder to.

What was the Wampserver version installed?
Because, neither version 3.0.0, nor 3.0.4 include MySQL 5.6.17 and there is no addon MySQL 5.6.17.

Please, give us more informations about old and new Wampserver version's and if 32 or 64 bit.

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



Edited 2 time(s). Last edit at 08/14/2016 06:23PM by Otomatic.

Options: ReplyQuote
Re: Transferring Databases
Posted by: RiggsFolly (Moderator)
Date: August 14, 2016 07:02PM

Hi,

Just to clarify your other point.

WAMPServer has never magically uninstalled itself. What happened is you unistalled it

---------------------------------------------------------------------------------------------
(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: Transferring Databases
Posted by: CyberSpud (---.dsl.pipex.com)
Date: August 14, 2016 07:36PM

I certainly didn't uninstall it. I was in the middle of typing a letter when a command box popped up and then disappeared leaving wampserver missing. I think that after using computers since 1982, I would know if I had uninstalled an application intentionally! Doh...

Options: ReplyQuote
Re: Transferring Databases
Posted by: CyberSpud (---.dsl.pipex.com)
Date: August 14, 2016 07:42PM

To answer the more helpful response from Otomatic:

The original Wamp version was version 2.5 64bit and the newly installed version was 3.04 64bit. As I had to re-install anyway, I thought it would make sense to install the latest version but perhaps this was not the best plan?

As I will not be able to import an SQL file, is there a way round this perhaps using another tool that can create an sql file from the files I have?

Options: ReplyQuote
Re: Transferring Databases
Posted by: RiggsFolly (Moderator)
Date: August 14, 2016 07:46PM

Hi

I have also been using computers since the late 70's and this is the first case of Spontaneous software uninstall that I have ever come across.

However it is not the first case of a user claiming "I did nothing, it just broke". Maybe you have come across those users in your long career with computers as well.

---------------------------------------------------------------------------------------------
(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: Transferring Databases
Posted by: RiggsFolly (Moderator)
Date: August 14, 2016 07:49PM

There is a solution, however a question first.

Did you have any INNODB databases?
Do you still have the \wamp\bin\mysql\mysql{version}\data\ibdata1 file?

---------------------------------------------------------------------------------------------
(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: Transferring Databases
Posted by: CyberSpud (---.dsl.pipex.com)
Date: August 14, 2016 10:07PM

RiggsFolly Wrote:
-------------------------------------------------------
> Hi
>
> I have also been using computers since the late
> 70's and this is the first case of Spontaneous
> software uninstall
that I have ever come
> across.
>
> However it is not the first case of a user
> claiming "I did nothing, it just broke". Maybe you
> have come across those users in your long career
> with computers as well.

I really don't know why you think it's ok to be so patronising and sarcastic to someone who is just asking for help. No wonder that tech support and software forums have such a poor reputation for snooty attitudes.

Thankfully my career with computers has been in software programming and not user support. Had I been in user support and suspected that someone had uninstalled some software themselves, I would politely ask them whether they had, not accuse them of doing so in bold type.

It is certainly not the first time that I have had software stop working or files become corrupted after a windows upgrade or a virus software update. I have heard of people experiencing registry corruption without an obvious cause and malware infection can make a computer behave erratically.

This is the first time that I have experienced something that does indeed look like "Spontaneous software uninstall" and if I hadn't seen it happen right before my eyes, I would have found it hard to believe. However, that is exactly what did happen and no amount of condescending remarks by you changes that FACT. I immediately ran malware/rootkit detection software as I thought maybe the computer had been compromised but nothing was found, so I am mystified as to the cause.

I may be an experienced programmer but I am new to the Apache/MySQL setup so I don't know how it all works. I had hoped that some helpful person on the forum could help me get my databases back without data loss. If your superiority issues are anything to go by, I'm unlikely to find much help here.

Options: ReplyQuote
Re: Transferring Databases
Posted by: RiggsFolly (Moderator)
Date: August 14, 2016 10:20PM

OK,

But I did ask a couple of questions with a view to helping you get the databases back.

1. Was/Were your database(s) INNODB or MYISAM?

2. If they were INNODB, do you still have the \wamp\bin\mysql\mysql{version}\data\ibdata1 file?
- Without this file (unless you amended the default config to use a file per table) then we cannot recover the INNODB databases.

3. If they were MYISAM, do you still have the \wamp\bin\mysql\mysql{version}\data\{databasename} folders?
- If you have these folder it is possible to recover these, although its a bit of a contrived process that will take a bit of explaining.

---------------------------------------------------------------------------------------------
(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: Transferring Databases
Posted by: CyberSpud (---.dsl.pipex.com)
Date: August 14, 2016 11:55PM

RiggsFolly Wrote:
-------------------------------------------------------
> OK,
>
> But I did ask a couple of questions with a view to
> helping you get the databases back.
>
> 1. Was/Were your database(s) INNODB or MYISAM?
>
> 2. If they were INNODB, do you still have the
> \wamp\bin\mysql\mysql{version}\data\ibdata1 file?
> - Without this file (unless you amended the
> default config to use a file per table) then we
> cannot recover the INNODB databases.
>
> 3. If they were MYISAM, do you still have the
> \wamp\bin\mysql\mysql{version}\data\{databasename}
> folders?
> - If you have these folder it is possible to
> recover these, although its a bit of a contrived
> process that will take a bit of explaining.

Thanks.

1. My databases are INNODB

2. I only have the ibdata1 file for the new installation, not the original one.

3. I have all the folders but not using MYISAM

Is there any hope of restore?

Options: ReplyQuote
Re: Transferring Databases
Posted by: RiggsFolly (Moderator)
Date: August 15, 2016 12:07AM

Sorry, if you have a quick check on how MYSQL stores INNODB tables, almost all of the table data gets stored in the IBDATA1 file.

You probably have a folder below the data\ folder with the name of your database, but that just contains .frm files which are basically the schema's of each INNODB table in that database.

Sorry, your data is lost, unless you have a database backup, or you can find the mysql folder on some sort of disk/system backup.

If thats the case try us again when you have recovered it

---------------------------------------------------------------------------------------------
(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: Transferring Databases
Posted by: CyberSpud (---.dsl.pipex.com)
Date: August 15, 2016 08:28PM

I have done some reading on MyISAM and INNODB and according to the MySQL documentation, the file per table option is enabled by default in version 5.6 and higher. So it looks like that option would be set even though I had not explicitly enabled it myself in the my.ini file.

So maybe recovery is possible after all? I do have the .ibd files as well as the .frm files.

I have done some research on possible recovery methods and most seem to require the MySql Utilities Console to be installed so I have done that in preparation. There seem to be various methods though, so rather than just try these at random, is there a method that you can recommend please?

I also noticed that according to the MySQL documentation, INNODB should be the default engine but the my.ini file supplied by Wampserver has the default engine as MYISAM. Has this been specifically changed by Wampserver?

Options: ReplyQuote
Re: Transferring Databases
Posted by: Otomatic (Moderator)
Date: August 15, 2016 08:53PM

Hi,

To morrow, I'll write an addon MySQL 5.6.17 with same configuration as with Wampserver 2.5 and I'll explain how to try to recover your database.

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

Options: ReplyQuote
Re: Transferring Databases
Posted by: CyberSpud (---.dsl.pipex.com)
Date: August 15, 2016 09:49PM

Otomatic Wrote:
-------------------------------------------------------
> Hi,
>
> To morrow, I'll write an addon MySQL 5.6.17 with
> same configuration as with Wampserver 2.5 and I'll
> explain how to try to recover your database.


Thank you.

Options: ReplyQuote
Re: Transferring Databases
Posted by: RiggsFolly (Moderator)
Date: August 15, 2016 10:21PM

Oto,

How can he recover his databases if he does not have the ibdata1 file that contained all the database tables?

---------------------------------------------------------------------------------------------
(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 08/15/2016 10:35PM by RiggsFolly.

Options: ReplyQuote
Re: Transferring Databases
Posted by: Otomatic (Moderator)
Date: August 16, 2016 09:16AM

Hi,

> How can he recover his databases if he does not have the ibdata1 file that contained all the database tabl

This is actually the right question.
But what I do not understand is why this file has disappeared while the C:\wamp\bin\mysql\mysql5.6.17\data has not been deleted (This is part of the uninstall Wampserver 2.5).

However, there is almost no chance of success ... but ... nothing ventured, nothing gained.

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

Options: ReplyQuote
Re: Transferring Databases
Posted by: Otomatic (Moderator)
Date: August 16, 2016 10:25AM

Hi,

In http://wampserver.aviatechno.net/, section Addons Wampserver 3, column MySQL, MySQL 64 bit X64, after Click on See all available versions you'll find addon Mysql 5.6.17 64 bit x64.
Download it then run « as administrator » to install MySQL 5.6.17 into your Wampserver 3.0.4.
It is configured the same way as for Wampserver 2.5.

You said that there is the old mysql 'data' folder of the old Wampserver 2.5 version.
- Note the exact path of this data folder with slash (/) in the path, for example:
C:/wamp/bin/mysql/mysql5.6.17/data

- Launch Wampserver (As adminsitrator)
- Switch to MySQL 5.6.17
- Verify no errors in mysql.log
- Verify that PhpMyAdmin is still functionnal (With MySQL 5.6.17, user = root with blank password)
- Exit PhpMyAdmin
- Icon Wampmanager -> MySQL -> Service -> Stop service
- Edit my.ini (Icon Wampmanager -> MySQL -> my.ini
Replace the content of datadir, for example:
datadir="j:/wamp64/bin/mysql/mysql5.6.17/data"
by the path previously noted (The old data folder of Wampserver 2.5)
datadir="c:/wamp/bin/mysql/mysql5.6.17/data"
save the modified file

- Icon Wampmanager -> MySQL -> Service -> Start/Resume service
Wampmanager Icon should go green.
Otherwise, it's already over, no recovery of the database is possible.

- Launch PhpMyAdmin
---- Warning: The usernames and passwords are ones you had with Wampserver 2.5.

... and cross your fingers ....

Nevertheless, I follow RiggsFolly and I think it will not work.

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

Options: ReplyQuote
Re: Transferring Databases
Posted by: CyberSpud (---.dsl.pipex.com)
Date: August 22, 2016 01:15AM

Thanks for the above instructions, this was not successful but I have managed to restore my tables with the following instructions:

FIRST:
1. Make sure file per table option enabled.
2. Install MySql Utilities Console
3. Open a Command Prompt
4. Point to your old database directory. Ex: cd C:\wamp\bin\mysql\mysqlxxx\data\name_of_database
5. Type command:
mysqlfrm --server=root:@localhost:3306 "name_of_table.frm" > name_of_table.txt --port=3310
6. Command above will create txt file containing the script to create the old table. Add following to end of script:
row_format=compact;

SECOND:
1. Run MySQL Console
2. Create new database. Ex: create database name_of_database;
3. Choose that database. Ex: use name_of_database;
4. Copy and paste script to create the old table.
5. Type:
ALTER TABLE `name_of_table` DISCARD TABLESPACE;
6. Go to your old database directory, then copy your name_of_table.ibd file manually into new database folder.
7. After that type:
ALTER TABLE `name_of_table` IMPORT TABLESPACE;
8. Done
9. You can test with query:
Select * from name_of_table limit 0,10;

Hope this might be useful information for you.

Options: ReplyQuote
Re: Transferring Databases
Posted by: CyberSpud (---.dsl.pipex.com)
Date: August 22, 2016 01:28AM

Also, I may have found the culprit to the original corrupted installation of wampserver that appeared like it had been uninstalled (though it left the old data behind). I just had a command window pop up again and I realised that it belonged to the "MySQL Installer" program that I use for installing MySQL Connectors and MySQL for Visual Studio etc.

No idea why it caused the issue but it was definitely the command window I saw just before my original wampserver files went missing.

Options: ReplyQuote
Re: Transferring Databases
Posted by: jicenoz (---.red-88-8-18.dynamicip.rima-tde.net)
Date: August 29, 2016 09:10AM

Hello.

I have a similar problem because I had to format the whole computer.
I saved the files and the old directory and now I have a new version of Wampserver and I want to transfer my old databases and working in old proyects.
I have the old IBDATA1 file but it seems that I have a problem with different versions of Wampserver and MySQL.
Now I have installed Wampserver 2.2 and the old databases was with MySQL5.6.17 but I can not remember the old version of Wampserver I had. It seems that there is not an addon for MySQL5.6.17 with Wampserver 2.2. Do I have to update Wampserver?
I have the old IBDATA1 file in a different directory but I don´t know what to do with it.
Another problem is that I have made a new project and I am afraid that if I update the version I can have problems with this new project also. Do I have to make a backup of this project and how to do that in order to do not having problems after?
Thanks for the feedback for this problem.

Options: ReplyQuote
Pages: 12Next
Current Page: 1 of 2


Sorry, only registered users may post in this forum.