Trying to transfer and connect databases for my websites from old wamp into new installation of wamp, INNODB, please help
Posted by: tf22raptor (---.lns20.mel6.internode.on.net)
Date: January 09, 2014 05:00AM

Hi all,

I had wamp running on my pc for a few years, but recently I have added new hard disk drives and have done a complete reinstall of my system (reinstalled win7 and all applications), and I just have an backup copy of the wamp

directory and all its subfolders etc.

Now my old wamp server used to be located at C:\wamp, but with my new installation and harddrive this original folder and all my website files is located at L:\wamp

Now on my new system I did a fresh install of wamp which again is located at C:\wamp (I also kep my username and password the same for both)


All I am trying to do is bring across the old database files and reconnect them to their websites on my new installation of wamp.

I have tried
1. I copied my websites directory from L:\wamp\mysite to the new installation at C:\wamp\mysite

2. I read that the databases are located at wamp\bin\mysql\mysql5.1.53 so I simply copied them from the old wamp to the new C:\wamp into the same location

I run my localhost\mysite and now I get "Database connection error (2): Could not connect to MySQL."
I checked the configuration.php file and it looks pretty fine to me.
I also checked my privledges on the database and made sure the user that was in my configuration.php was in the privledges to the database.


I did read that depending on the db type I might not be able to simply copy and paste database directories like I have done.
From
[forum.wampserver.com]

MYISAM dbs can be just copied and pasted
INNODB db need to be exported
if there is tablename.opt or databasename.opt then its using INNODB

I was setting up dbs by whatever the default scenario was (for Joomla) so I checked the db folder and can see a "db.opt" file which tells me that the db needs to be exported.


The problem now is how do I run my old copy of L:\wamp so I can export the database out?
I tried just running the wampmanager.exe from its L:\wamp directory but I got "C++ errors" when it tried to run.
Not sure what to do now,
Any help would be great

Options: ReplyQuote
Re: Trying to transfer and connect databases for my websites from old wamp into new installation of wamp, INNODB, please help
Posted by: RiggsFolly (---.as13285.net)
Date: January 09, 2014 11:19AM

Hi tf22,

Ok this can be done quite simply if these assumptions are true

1. Your old system had wamp installed in C:\wamp
2. You took a complete copy of the whole C:\wamp folder and all its subfolders and put it on L:
3. You are not trying to change versions of Apache or MySQL.

So the process is:

1. Uninstall the new wamp installation from your C: drive
2. Once uninstalled delete the C:\wamp folder and anything within that folder that remains.

3. Copy your backup L:\wamp and all subfolders to C:\wamp

4. ReCreate the WAMP desktop icon if it no longer exists:
Using explorer locate C:\wamp\wampmanager.exe and make a shortcut of it and place it on your desktop
( left click on wampmanager.exe and click 'Create Shortcut' from the menu. )
( drag and drop this new shortcut to your desktop )
( rename it on your desktop to WampServer )

5. Double click this new icon to run WampManager.

6. Using the WampManager menus by left clicking the icon in the system tray
wampmanager -> Apache -> Service -> Install Service
wait a few seconds
wampmanager -> MySQL -> Service -> Install Service
wait a few seconds

7. Now restart all services
wampmanager -> Restart all Services





Things you may need to check !!

a. Check your c:\windows\system32\drivers\etc\hosts file is as you had it before.
It should at least have:

127.0.0.1  localhost
::1  localhost

Check this before starting the recovery
b. Your new installation of windows may not have all the required C/C++ runtime libraries these are what you should have and it you dont then please install them, links provided.

The 2008 Redist is used by wampmanager
The 2010 Redist is used by some versions of Apache ( depending on compiler used )
The 2012 Redist is used by some versions of Apache ( depending on compiler used )

FOR WAMP 32bit

Microsoft Visual C++ 2008 SP1 Redistributable Package (x86) [www.microsoft.com]
Microsoft Visual C++ 2010 SP1 Redistributable Package (x86) [www.microsoft.com]

If you are using WampServer 2.4

Microsoft Visual C++ 2012 [www.microsoft.com]
And select vcredist_x86.exe



If you get problems and think you may need some help, install teamviewer and I can help trouble shoot with you. Post another message here if you need this extra help and we can make a mutually agreeable time. I am in the GMT timezone.

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