Hello,
I'll try to explain with my bad English.
Install a new MySQL version via the msi installer is really not a good idea.
Indeed, there will be creating multiple files in multiple locations as well as entries in the registry and records dll file on the system. And all these things will not be removed when uninstalling, it remains number slag, the most annoying being the my.ini file in windows/system32.
When MySQL is started, it searches for a file my.ini, first in the folders reported in the PATH environment variable before looking in its own folder, so that the file will be loaded windows/system32/my.ini not wamp/bin/mysql/mysql5.6.20/my.ini (1)
Before adding a version of MySQL, there are two essential things to solve:
- How to move your own database to the new version.
- How to transfer existing users to the new version.
Database are in wamp/bin/mysql/mysql5.6.19/data/ folder.
The only sustainable way to transfer the database is to export it to a file in SQL format. This can be done through phpMyAdmin or command line using mysqldump or with applications like MySQLDumper.
Users are in table users of mysql database.
They can be exported by phpMyAdmin, Users tab, Validate all, export.
It must then copy the result in a txt file or if a multiple clipboard is used, make sure to keep it in the clipboard.
But as long as we stay in the same branch of MySQL (5.6.x, 5.6.y, 5.6.z) there exists a much simpler way that NOT requires transfer of database and user.
And, this method is to move the databases of those included MySQL, outside Wampserver tree.
**** How to move MySQL databases ****Note:
This is to be done before installing a new version of MySQL.- 1 - Create a folder where you want to put your databases, for example: g:\wwwbases
- 2 - Copy
all files and folders from c:\wamp\bin\mysql\mysql5.6.19\data\ to g:\wwwbases\
- 3 - Edit the file c:\wamp\bin\mysql\mysql5.6.19\my.ini
Replace
datadir="J:/wamp/bin/mysql/mysql5.6.19/data/"
By
datadir="G:/wwwbases/"
Save the modified file
Launch Wampserver and verify that localhost and PhpMyAdmin work well and that you can see tour databases.
Exit wampserver
Rename the folder c:\wamp\bin\mysql\mysql5.6.19\data\ to c:\wamp\bin\mysql\mysql5.6.19\old_data\
Start Wampserver to verify that the new location of your database is functional.
You can delete your databases folder c:\wamp\bin\mysql\mysql5.6.19\old_data\
**** Install new version of MySQL ***- 1 - Create folder c:\wamp\bin\mysql\mysql5.6.20\
- 2 - Download MySQL 5.6.20 zip archive from: [
cdn.mysql.com]
- 3 - Unzip the downloaded file into a temporary folder, for example f:\temp\
This will create a folder f:\temp\mysql-5.6.20-win32\
- 4 - From f:\temp\mysql-5.6.20-win32\
copy folders bin, data and share
into c:\wamp\bin\mysql\mysql5.6.20\
- 5 - From c:\wamp\bin\mysql\mysql5.6.19\
copy files my.ini and wampserver.conf
into c:\wamp\bin\mysql\mysql5.6.20\
- 6 - Edit file c:\wamp\bin\mysql\mysql5.6.20\my.ini
Replace
basedir=J:/wamp/bin/mysql/mysql5.6.19
by
basedir=J:/wamp/bin/mysql/mysql5.6.20
Save the modified file.
Launch Wampserver
Switch to the new version of MySQL
Wampmanager->MySQL->Versions->5.6.20
That's it!
Well, not quite, because we must now verify that your databases are "updated and compatible" to the new version of MySQL.
**** run mysql_upgrade ****Let us not forget that arrived here WampServer is launched with the new version of MySQL active ... that's fine, that's what it takes!
- 1 - Launch a command windows as an administrator by Start, Run and type
%SystemRoot%\system32\cmd.exe
- 2 - Be placed in the bin folder or mysql 5.6.20 for wamp:
c:\wamp\bin\mysql\mysql5.6.20\bin\
Note: It is possible, via the File Explorer, perform a Shift-Right-Click to folder above and entering "Open command window here".- 3 - Once there you have to know whether or not you have set a password for root@localhost
If you have set a password, in the command windows type:
mysql_upgrade.exe --user=root --host=localhost --password=my_password
If you don't set password, in the command windows type:
mysql_upgrade.exe --user=root --host=localhost --password=
and wait until the end of the procedure.
All tables in all databases should be OK, for example:
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
mysql.general_log OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
mysql.ndb_binlog_index OK
There may be several warnings like:
Warning: Using a password on the command line interface can be insecure.
Do not take this into account, it is normal.
That's all.
Important NoteIf you want to use WampServer with several versions of MySQL from different branches, for example 5.6.20 and 5.5.39, you cannot use with the 5.5.39 release, mysql databases and performance_schema of 5.6.20 version that is to say that the my.ini datadir for 5.5.39 version can not point to the same folder as the my.ini datadir version 5.6.20.
This is because datadir does not separate the internal MySQL of your own databases.
We must therefore allow the datadir version 5.5.39 point to the default datadir = C:/wamp/bin/mysql/mysql5.5.39/data and in this data folder create junctions on your own databases.
(1) I had all these problems, there are two years, after installation of MySQL installer msi.
Moreover, on Wampserver forums and unless otherwise specified, I do not give as solutions that I have duly tried.
---------------------------------------------------------------
Documentation Apache -
Documentation PHP -
Documentation MySQL -
Wampserver install files & addons