Nov 28, 2013

f Comment

Upgrade WAMP WITHOUT Losing MySQL Database Records in SECONDS!

Amazon WampServer is a Windows web development environment. It allows you to create web applications with Apache2, PHP and a MySQL database. Alongside, PhpMyAdmin allows you to manage easily your databases. When you upgrade WampServer you also get the latest version of PhpMyAdmin, which often shows marked improvements over the previous version.

Despite the benefits of having a single-effort installation of the web development tools, the biggest downside is you lose all the data stored in the previous MySQL server instance.

This article will walk you though upgrading WampServer in SECONDS without losing any MySQL database tables and data by following the following simple steps. Let's assume you are upgrading from WAMP 2.2 to WAMP 2.4.

Another downside is if you upgrade to a newer version of WampServer you are subjected to use whatever versions of Apache2, PHP, MySQL packaged in that version.

Step 1: Download and install WAMP 2.4

You should install WAMP 2.4 in a different folder. Let's assume your WAMP 2.2 is installed at C:\wamp2.2\. Go ahead and install WAMP 2.4 at C:\wamp2.4\.

Step 2: Copy configuration files

Apply the changes you made to the original Apache, MySQL, PHP configuration files to the new configuration files in C:\wamp2.4\ in their respective locations. For example let's say you've changed the value of DocumentRoot directive in httpd.conf. Apply the same change in Wamp 2.4's httpd.conf.

You can try overriding the new configuration files with the old configuration files but if any of them is not backwards compatible you'll run into problems when running the WAMP executable.

In Apache's configuration file, a change a developer often makes is the module section. e.g. LoadModule rewrite_module modules/

In PHP's configuration file, a change a developer often makes is the extension section. e.g. extension=php_curl.dll

Step 3: Copy MySQL data

Copy the folder C:\wamp2.2\bin\mysql\mysql5.5.20\data\ and paste the entire folder at C:\wamp2.4\bin\mysql\mysql5.6.12\. This folder contains the actual MySQL database schema and records and indexes.

If you run into compatibility issues let me know.

Step 4: Configure PhpMyAdmin

Open C:\wamp2.4\apps\phpmyadmin4.0.4\ and make the following changes so that when you open PhpMyAdmin interface you don't need to login. This step is optional.
//comment out the following line if it exists
//$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'myOriginalUserName';
$cfg['Servers'][$i]['password'] = 'myOriginalPassword';

Go ahead and start C:\wamp2.4\wampmanager.exe and you are done!

If you have any questions let me know and I will do my best to help you!
Please leave a comment here!
One Minute Information - by Michael Wen
ADVERTISING WITH US - Direct your advertising requests to Michael