Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upgrade MySQL 5.6 to 5.7

I'm quite new to MySQL and learning fast. I installed WAMP on my system and have been using it for a month or so. I'm looking to upgrade MySQL to 5.7 as I will be in need of the new gis features but I can't find a easy to follow step by step on what I need to do.

I have been reading over at MySQL on how it is done but find it either confusing or incomplete, not sure which. I have been reading for the last 6 hours and still no closer to knowing how it is done.

I have backed up my databases, which I'm really not concerned with at this point as they are still in the development and learning state and will be rebuilt anyways.

How do I upgrade 5.6 to 5.7 with full instructions?

like image 391
Paul Avatar asked Jul 21 '15 18:07

Paul


People also ask

Which is faster 5.6 or 5.7 MySQL?

MySQL 5.7 is 3x faster than MySQL 5.6, delivering 1.6 Million SQL Queries Per Second.

Is MySQL 5.6 outdated?

MySQL 5.6 has reached its EOL in February 2021, and we recommend that you start to plan migrating to MySQL 8.0. The latest version of MySQL is supported until April 2026 and keeps your database features up to date with continuously receiving updates and fixes, especially the security patches.

Can I upgrade MySQL version?

Step 2: Navigate to Software > MySQL Upgrade or type “MySQL” into the search bar. You may also find it under SQL Services > MySQL/MariaDB Upgrade. Step 3: Select the version of MySQL you want to upgrade to and click Next. Now follow the upgrade steps, and it'll take care of everything for you.

Is MySQL 5.6 free?

MySQL Community Edition is a freely downloadable version of the world's most popular open source database that is supported by an active community of open source developers and enthusiasts.


1 Answers

  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 ) Suggested source [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 ( using Run 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.

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

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

  3. At this point assuming 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.

from here: http://forum.wampserver.com/read.php?2,111797,124054

like image 139
llioor Avatar answered Oct 25 '22 22:10

llioor