Wednesday, June 4, 2008

Upgrading MySQL - with xampp installed first

Hello all!

We have noted that the internet requires an article on how to upgrade your MySQL server with xampp installed first. MySQL server on your computer are be shared among many HTTP servers - Apache or IIS - on the same operating system. Thus, there are possibilities you might want to upgrade or downgrade your MySQL server.

xampp by Apache Friends is a package that includes the Apache server, PHP and MySQL together with many other wonderful functions for local web development(localhost). However, the MySQL server included is never up to date. So below is how you upgrade your MySQL server.

1) Download MySQL server from http://dev.mysql.com/downloads/
2) When you set up MySQL server, one of the steps of the installer should show an "Advanced" button, click on it.
3) Following you should see where the server is about to install to. Change it to %your_xampp_installation_path%\mysql\ (e.g. C:\xampp\mysql\)
4) After installation, your MySQL is upgraded.

Note that if you do not change the installation directory of MySQL server, the server will not be upgraded as the default server is still in your xampp folder. After upgrading, you can use MySQL Administrator (GUI Tools) or MyPHPAdmin to check the server version.

Note that you are advised to back up your database information before performing such upgrade or maintenance work. I will not be held responsible for any problems caused directly or indirectly by my articles or whatsoever.

5 comments:

Justin Fanning said...

While I do appreciate this was written in 2008, I just downloaded the 2012 Mac MySQL and no option during the install was provided to change the default install directory.

bokonon said...

The current installer does have a way to choose the install location. The button is called Custom not Advanced. The description doesn't mention changing the location, but you can.

Raj Kumar. T said...

I was able to change the install location while installing 5.6.10, windows version.

Louis Jeune said...

I have found the perfect way of doing it without any side affects and also works perfectly with xampp control panel...

before you begin, make sure you backup your databases to files and also export all users to a file
be sure to stop mysql there is no need to uninstall the service

Step 1: Download the new version on MySQL install version or zip.(install version prefered 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 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 data
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 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

Zinavo Bangalore said...

Very useful post, Share more updates. https://www.blogger.com/comment.g?blogID=3772193622268326056&postID=8750146976845507018&page=1&token=1470753069519