How can I upgrade the MySQL version included in XAMPP?
I have found the perfect way of doing it without any side effects and also works perfectly with the xampp control panel...
Before you begin, make sure you backup your databases to files and export all users to a file. Make sure to stop mysql, but there is no need to uninstall the service.
Step 1: Download the new version of MySQL install version or zip (install version preferred since it is considerably smaller)
Step 2: Install MySQL to C:\TEMP. Install only the MySQL server
Step 3: Do not run advance options. Do not let it install a service. No configuration is required.
Step 4: Go to C:\TEMP, look for installation and copy the following folders "bin, include, lib, share, support-files". be absolutely certain not to copy the data folder.
Once copied, go to your xampp folder, rename mysql folder to mysql_old. create new mysql folder then paste the contents that were copied
Step 5: Go to mysql_old and copy the data folder and paste it into your new mysql folder as well
Step 6: Go to the bin folder within mysql that is located within xampp and create a blank my.ini file. If you are upgrading to version 5.6.11 which is what I did, then all you have to do is write a few commands which I have at the bottom of this instruction
step 7: Click start next to MySQL on the xampp control panel and it should start normally assuming to you followed to instructions properly. Once done, you can uninstall the mysql package that you had installed to C:\TEMP.
Any questions or problems, message me or post back!
BY THE WAY, the key is having a proper my.ini file
here is mine:
[client]
port=3306
socket="C:/xampp/tmp/mysql.sock"
[mysqld]
port= 3306
socket = "C:/xampp/tmp/mysql.sock"
pid_file = mysql.pid
skip-federated
explicit_defaults_for_timestamp
basedir="C:/xampp/mysql"
datadir="C:/xampp/mysql/data"
tmpdir = "C:/xampp/tmp"
log-output = FILE
log-error = mysql_error.log
general-log
general_log_file = mysql_general.log
slow-query-log
slow_query_log_file = mysql_slow.log
default-time-zone = -5:00
long_query_time = 2
plugin_dir = "C:/xampp/mysql/lib/plugin"
server-id = 2
#ft_stopword_file = "C:/xampp/mysql/bin/mysql_ft_stopword_file.ini"
ft_min_word_len = 3
ft_max_word_len = 50
character-sets-dir = "C:/xampp/mysql/share/charsets"
character-set-server = utf8
collation-server = utf8_unicode_ci
innodb_ft_max_token_size = 50
innodb_ft_min_token_size = 3
innodb_ft_enable_stopword = off
key_buffer_size = 8M
query_cache_type = 1
query_cache_size = 4M
query_cache_limit = 4M
default-storage-engine = InnoDB
[mysql]
default-character-set=utf8
I tried @Seul Shahkee 's solution, works fine but in my case I also copied over the my.ini file from the old bin folder over to the new mysql folder. Some configuration variables are no longer supported though it seems, so I simply commented them out and it seems to work.. so far.. No 100% guarantee though..
Download latest MySQL but download the zip file not the MSI (installer).
Unzip the zip file to a location.
Shutdown Mysql process (no need to remove service) from XAMPP control panel.
Go to XAMPP folder, rename mysql folder to mysql_old
Copy the new unzipped mysql folder to XAMPP folder, in it delete the data folder.
Copy over the data folder from the mysql_old to the new mysql folder.
Copy over the my.ini file under mysql_old/bin to mysql/bin.
Remove (comment out) parameter table_cache = 64 from my.ini file. Note depending on version there may be other parameters you may need to comment out, and you may need to set new parameters to make up for the deprecated ones.
Copy over other ini and executable files from mysql_old root folder to mysql (XAMPP ini files, my-huge.ini, my-small.ini, etc..).
Run mysql process from XAMPP control panel. Should work. (You may need to kill XAMPP first).
(OPTIONAL) Run
mysql/bin/mysql_upgrade.exe -u USERNAME -p
to update tables in the local databases that may have problems due to the version change.