Recruiting the Next Gen

MySQL 5.5.11 Installation Tutorial – Step One

An application that I’m looking to install has set MySQL 5.5+ as an installation requirement. This tutorial has spawned out of three days of attempting to get MySQL upgraded from 5.1 to 5.5. Since this was the best tutorial that I was able to find (, I’ll give Ovais Tariq a plug here. Although the Ovais Tariq tutorial was very informative and helpful, it didn’t actually work for me. Although I do feel that it got close, so I’m rewriting it here with my experiences to helpfully assist some others.

I’ll be breaking this tutorial down into two parts: the first part is backing up and removing mysql from your current server; the second part of this tutorial is the installation of MySQL 5.5.11, found here.

Backup the MySQL configuration

$ mkdir /root/mysql-5.1-conf
$ cp -R /etc/mysql/ /root/mysql-5.1-conf

Backup the data directory

We will be backing up the data in the form of SQL dump as well as by copying the data files over to a safe place, just to be 100% sure about the data not getting lost.

$ mkdir /root/mysql-5.1-data
$ cp -R /var/lib/mysql/ /root/mysql-5.1-data

Backup the data as SQL dump

Backup the mysql database separately and not with all the other databases, because we are going to need it before we restore all the databases.

$ mkdir /root/mysql-5.1-dump
$ mysqldump -u user_name -p --databases mysql > /root/mysql-5.1-dump/mysql.sql
$ mysqldump -u user_name -p --databases db_name > /root/mysql-5.1-dump/db_name.sql

Secondary Backups

Backups are essential, I had a copy of phpmyadmin installed, so I took advantage of this and exported all of the databases into a gzip file and saved it to my desktop.

Secondary MySQL Server for Production sites

For my situation I’m working on a clients server that contains both, the development site as well as the production site. I used our 5Twenty Studios server and setup a database for the production website. I then redirected the production site to this new database while I upgrade the server.

As a test I shut down mysql on the server and confirmed that the dev site was offline and that the production site was alive and well.

$ /etc/init.d/mysql stop

Remove the older version of MySQL

Now is the time to remove the older version of MySQL, in this case I assume the older version to be MySQL 5.1

$ apt-get remove mysql-server-5.1
$ apt-get autoremove
$ apt-get remove mysql-client
$ apt-get autoremove

Remove the MySQL files from the older version

$ rm -R /var/lib/mysql
$ rm -R /etc/mysql
$ rm -R /usr/lib/mysql

I had to run through this installation process multiple times over the course of three days, so I used this next command to search for all of the mysql instances on my server and removed them. I wanted to make sure that I was working with a blank slate.

$ find / | grep mysql

Alright, now that you’re making sure that nothing is lost in this process, lets head to step two: Installing MySQL 5.5.11

Jonathon Byrd

As a software programmer with more than 15 years’ experience, Jonathon is also an entrepreneur who has owned several high-tech companies that were later merged with Red Rokk. He is responsible for overseeing the programming and development for large websites that include e-commerce sites such as Papa Murphy’s, Journey Gym, Body Glove, Grumble and many others. Jon's analytical abilities have allowed our team to bring on more sophisticated projects while his organizational skills have greatly improved our internal reporting procedures.
MySQL 5.5.11 Installation Tutorial – Step One
  1. Hogue


    Great web site. A lot of helpful info here. I’m sending it to a few buddies ans also sharing in delicious. Thanks for the help.

  2. PIT-36


    Truly good site thank you so much for your time in writing the posts for all of us to learn about.

Leave a Comment
Username *
Email *
Website *

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


Leave your email and we'll let you know when there's something exciting happening.

Or Follow Us

Close this popup