MySQL 5.5.x ADDONS?
Posted by: anAppBuilder (---.dhcp.reno.nv.charter.com)
Date: January 26, 2013 12:05AM

I am running WampServer Version 2.2 with MySQL version 5.5.16 which is about a year old. I don't see any MySQL 5.5.x ADDONS. Do I need to upgrade to WampServer Version 2.4 to keep my MySQL current?

Options: ReplyQuote
Re: MySQL 5.5.x ADDONS?
Posted by: RiggsFolly (---.as13285.net)
Date: January 27, 2013 05:16PM

Hi,

I keep meaning to get my head in gear and learn how to build WAMP ADDONs properly, but as yet have not found the time.

However this is the process I have used to upgrade mysql version on the past, you are welcome to use it.



======= Please READ IT ALL THE WEAY THROUGH BEFORE STARTING =====================
If you feel its to much for you, dont even start.




HowTo: Install a new version of MySQL into wamp and migrate your data properly.



Assumption: That you are using the default wamp config where all your databses are stored in the mysql.x.y.x\data\ folder.
If thats the case no backup of your databases is necessary, but it would not hurt, just in case.
This should also work if you are using innodb databases, stored in the mysql.x.y.x\data\ folder.


This will take you complete environment, including users, passwords and privilages so they do not need to be re-created on the new release.


I have tried to keep it simple here using c:\wamp, but you may have wamp on another drive, just change c: to whatever you use.

Before you start read the upgrade notes on the mysql.com site for information on anything you may have to do to your existing data before you start the upgrade.
There should be a page devoted to major upgrades, you will have to read between the lines if you are doing a minor upgrade.

A glance at the changelog is also a good idea as it will give you a clue as to what has changed and how that may effect your SQL and or data.


So here is the process:

1. Download the ZIP version of the mysql you want to run ( not the msi installer, only because I dont know what it may do or assume when it installs )
Suggestion only [www.mysql.com]

2. From wamp manager, Stop all services.

3. Go to c:\wamp\bin\mysql\ and create a new folder named appropriately i.e mysql5.5.28

4. Unzip the mysql and copy the contents of the MySQL folder into your newly created folder. Make sure the directory levels are the same as your existing MySQL folder.

5. Copy all the contents of your previous mysql\mysql5.5.10\data folder into the new data folder under your newly created version folder.
Thats EVERYTHING not just your databases, including the ibdata1, ib_logfile0, ib_logfile1 and all the mysql-bin.0000xx files.
We are going to use the recommended mysql-upgrade tool so this is ok to do.
This will also ensure that you keep all your Users and password and granted privilages intact when the upgrade is complete.

6. Copy c:\wamp\bin\mysql\mysql5.5.10\wampserver.conf to c:\wamp\bin\mysql\mysql5.5.28\wampserver.conf
All the folders in here are relative to where this file lives, so normally nothing need changing in here.

7. RIGHT CLICK wampmanager -> refresh
This will make wamp manager find your new version.
Check this by Left click wampmanager -> MySQL -> Versions Your new version should be available in the list.

8. From wamp manager -> MySQL -> Version click on your new version.
Normally you would have to uninstall the old wampmysql service and re-install the new wampmysql service, but wamp takes care of all that for you by just clicking the new version number.
This should also start the new mysql service, so now the new mysql is running.
BUT DONT DO ANYTHING YET!!!

9. Launch a command window ( As Administrator ).
CD into c:\wamp\bin\mysql\mysql5.5.28\bin folder ( the new releases bin folder ).
And run
mysql_upgrade -u[your MySQL admin userid] -p > upgrade_results.txt

It will ask you for the password for the admin user you provided on the -u parameter.
enter the password.

Wait while it runs, If you have very large databases this may take some time but normally it will take anything from a few seconds to a minute or two.
This will look at your databases and do any upgrades that are required and also any upgrades/maintenace of the mysql database that MySQL uses internally.
Thats the tables that contain your userids and password and privilages and other things.

10. Check for errors in the upgrade_results.txt file, fix if there are any.
You can repeat this as offten as you like, just refresh the data from the old versions data folder each time.

11. LEFT Click wamp manager -> MySQL -> Service -> Stop Service.
Then again and Start Service. This will load the changed mysql database with any new/changed config info.

12. At this point assumin you are staying on the newly installed version of MySQL its a good idea to run:
wampmanager -> MySQL -> MySQL Console
and run a
> reset master;

To reset the log files.



Thats it your are ready to go and all you userid's and data are converted to the new MySQL version.

TROUBLESHOOTING

The Beauty of WAMP
If you find you have a problem with one of your databases you can just switch the MySQL Version back to the old version, fix the databases using MySQL Workbench or phpMyAdmin.
The copy all the contents of the data folder into your new release and re-run the mysql_upgrade.exe as many times as it takes to fix your issues.

And of course if it all goes bad in a big way, you can switch the MySQL version back to whatever you were using before and all your data is still there UNTOUCHED.


Now this may seem obvious but I am going so say it anyway:
1. If everything goes smoothly you do have to remember that you now have 2 versions of the same database(s) that are being maintained SEPERATELY.
2. It is not possible to use this process to DOWNGRADE your databases!!!

Options: ReplyQuote


Sorry, only registered users may post in this forum.