How do I properly set up another version of MySQL within Wamp?
Posted by: Malkalypse (---.hsd1.il.comcast.net)
Date: July 30, 2017 11:13PM

I am using Wampserver 3.0.6 (64-bit) on Windows 10. Everything works fine on the default settings, but the lessons I am taking require MySQL 8.0 or higher. I know it is possible to set up Wamp to work with multiple versions of a language, but after hours of attempts and following various directions found through Google, I have not been able to successfully get this working. I do not have any databases that require backing up, so that is not a concern at this point, though of course I will need to know how to do so eventually.

From what I understand, the steps are something like the following:

- Download MySQL version and extract to a folder, e.g. mysql-8.0.2-dmr-winx64
- Copy the contents of the folder to a new mysql subdirectory, e.g. wamp64/bin/mysql/mysql8.0.2
- Copy the data folder from mysql5.7.14 to mysql8.0.2
- Copy wampserver.conf from mysql5.7.14 to mysql8.0.2
- Copy my.ini from mysql5.7.14 to mysql8.0.2
- Edit mysql8.0.2/my.ini and replace all instances of mysql5.7.14 with mysql8.0.2 (then save)
- Run WampServer64 as administrator

At this point, if I hover MySQL -> Version in my taskbar, it shows 5.7.14 with a check, and 8.0.2 below it. I click on mysql8.0.2 and a command window quickly opens and closes. At this point, the WampServer icon in my taskbar is orange. If I hover it, it says "local server - 1 of 2 services running". If I try to run the MySQL console, a command window opens and asks for a password. I hit enter because no password is set, and the command window says "ERROR (something something)" and instantly closes.

What is is that I am doing wrong?

Options: ReplyQuote
Re: How do I properly set up another version of MySQL within Wamp?
Posted by: Otomatic (Moderator)
Date: July 31, 2017 09:44AM

Hi,

MySQL 8.0.2
Branch 8 of MySQL is a branch under development. Versions can evolve from one day to the next without any guarantee of compatibility between these versions.

MySQL says: This is a milestone release, for use at your own risk. Upgrades between milestone releases (or from a milestone release to a GA release) are not supported.

> - Copy the data folder from mysql5.7.14 to mysql8.0.2

Huge mistake! The data folder should never be copied between different versions of MySQL and it never works between different branches.
Just a small indication to create the data folder, but not sure it is still valid for branch 8:
wamp64\bin\mysql\mysql8.0.2\bin\mysqld.exe --initialize-insecure

The "lessons" that ask you to use MySQL 8 are irresponsible. This way of doing it while wanting to use a version under development shows the little seriousness of such courses.

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.1 32 bit - Apache 2.4.29 - PHP 7.2.0/7.1.12/7.0.26/5.6.32 - MySQL 5.7.20 - MariaDB 10.2.9
Wampserver 3.1.1 64 bit - Apache 2.4.29 - PHP 7.2.0/7.1.12/7.0.26/5.6.32 - MySQL 5.7.20 - MariaDB 10.2.9
PhPMyAdmin 4.7.5 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »



Edited 1 time(s). Last edit at 07/31/2017 10:56AM by Otomatic.

Options: ReplyQuote
Re: How do I properly set up another version of MySQL within Wamp?
Posted by: Malkalypse (---.hsd1.il.comcast.net)
Date: August 01, 2017 01:25AM

Thanks for the input!

As I said I don't need to copy any data yet, so that part doesn't concern me as much -- although I should apparently just use mysqldump. I have tested using it and it seems fairly straightforward.

Anyway, from what I've looked at, I will probably only need MySQL 8 for the lessons relating to CTEs, since they are unsupported by MySQL previous to that. That gives me some time to work with 5.7 and figure out what I need to do to get 8 working later on. I've installed 8 previously (I /think/ 8.0.1) and had it working with Wamp, so I know it can be done. But when I tried again on my computer at home, no luck.

It would be more convenient to be have a laptop that I can use at both places but the laptop I have is ancient and running Vista..

EDIT:
Anyway, if I could just find a "definitive" guide for adding a new version of MySQL to Wamp, I can worry about the idiosyncrasies of MySQL 8 later. As I said, this is for learning purposes, and I won't be making any databases that I will need later on down the line anyway.



Edited 1 time(s). Last edit at 08/01/2017 01:28AM by Malkalypse.

Options: ReplyQuote
Re: How do I properly set up another version of MySQL within Wamp?
Posted by: Otomatic (Moderator)
Date: August 01, 2017 09:37AM

Hi,

The procedure you have proposed is "almost" the right one!

- Exit Wampserver
- Download MySQL version and extract to a folder, e.g. mysql-8.0.2-dmr-winx64
- Copy the contents of the folder to a new mysql subdirectory, e.g. wamp64/bin/mysql/mysql8.0.2
- Open a command windows (as an administrator) on wamp64/bin/mysql/mysql8.0.2/bin/
- Type : mysqld.exe --initialize-insecure
--- This will create the right data folder
- Copy wampserver.conf from mysql5.7.14 to mysql8.0.2
- Copy my.ini from mysql5.7.14 to mysql8.0.2
- Edit mysql8.0.2/my.ini and replace all instances of mysql5.7.14 with mysql8.0.2 (then save)
- Run WampServer64 as administrator

This worked perfectly on my WAMPServer 3.0.9 x64:


------------------------------------------------------------------------------------------------------------
Wampserver 3.1.1 32 bit - Apache 2.4.29 - PHP 7.2.0/7.1.12/7.0.26/5.6.32 - MySQL 5.7.20 - MariaDB 10.2.9
Wampserver 3.1.1 64 bit - Apache 2.4.29 - PHP 7.2.0/7.1.12/7.0.26/5.6.32 - MySQL 5.7.20 - MariaDB 10.2.9
PhPMyAdmin 4.7.5 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote
Re: How do I properly set up another version of MySQL within Wamp?
Posted by: Malkalypse (---.hsd1.il.comcast.net)
Date: August 01, 2017 06:58PM

Fantastic, worked like a charm! Thanks smiling smiley

Options: ReplyQuote


Sorry, only registered users may post in this forum.