Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

What is the best way to upgrade a MySQL version in a Linux Server

I have database around 14 GB running with 8 -15 GB ram(diffrent deployments) .At present MySQL version is 5.5 and I’m planning to move to 5.6 . I did similar activity in past for 5.1 to 5.5 upgrade .

Steps I followed is 1. Resolve any syntactical issue that can be faced in upgrader version of Mysql in code base prior to upgrade.

at the day of upgrade 2. Shut down the MySQL with application; take two backups (one with data and without data) 3. Uninstall and remove old MySQL instance and install new MySQL instance. 4. Import backup without data first and with data second and go live again.

I experience that during above process, it took very long time for importing backup file to database as some of our production servers run with less memory and during this remotely increase the risk as well. This is the only best way I know, is there a best approach I can fallow to upgrade MySQL version in future with very less time . Appreciate your help . Please note that I do not have facility to get another machine to do this, so I have to do in same production server where justifiable downtime is acceptable.

share|improve this question
    
Why do you want to upgrade? –  Mihai Feb 11 at 17:33
    
get 5.6 innodb improvement and other improvements .question is raather on general upgrade procedure than the version –  csf Feb 12 at 12:53

2 Answers 2

Percona has mentioned steps here and this is applicable to MySQL upgrade as well: http://www.percona.com/doc/percona-server/5.6/upgrading_guide_55_56.html

Also you can follow steps mentioned in MySQL documentation: http://dev.mysql.com/doc/refman/5.6/en/upgrading-from-previous-series.html

share|improve this answer

Unless you are fairly experienced and/or already have a custom mysql build, I generally recommend sticking with the stock build from your chosen Linux distribution. If this is a little behind what you need in the official stable build then you might find there is a suitable upgrade in an official but "less core" repository, such as the backports repo if you are using Debian/stable as you base. This way security updates are a lot less hassle and you'll probably find the upgrade relatively smooth (add alt repo, mark packages you want from it instead of the base repos, run standard update/upgrade, verify results).

You still need to address any areas of you code that are affected by any breaking changes between the mysql versions involved first of course, and take full backups (and adequately test them) before the upgrade in production. And of course it is very strongly recommended that you practise the upgrade process and results in a test environment before performing it in production.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.