Install mysql server 5.5 on Debian and CentOS 5 and CentOS 6

→ Are you a new visitor? Please visit the page guidance for new visitors ←

Install mysql server 5.5 on linux

Mysql is the most broadly used database management system on the internet, I’m not entirely sure an exact percent usage, but I’m pretty sure it is the most used one. Compared to previous versions, mysql 5.5 has better multi-core scalability, better IO for Inodb, default storage has now been set to Inodb and a lot more things been added and removed at the same time to this version. More information here:

In this article I’m going to show you how you can install mysql server 5.5 on linux operating systems, well its not that hard really, installing it is probably the easiest thing, configuring and optimizing it based on your system configuration is probably the big headache.

Without further delay, let’s start with the installation.

Install mysql 5.5 on debian / Ubuntu

Mysql version 5.0, 5.1 and 5.5 should be in the default repository of your operating system. For version 5.5 we need to run:

You will then see a similar screen like below where you are asked to enter the mysql root password:

Install ymsql server 5.5

Install ymsql server 5.5

Enter the mysql password and hit the OK button there. You will be asked to repeat the password, please proceed and enter it again and hit the OK button. That’s it, mysql should be installed and version should be 5.5

Install mysql 5.5 on CentOS

For CentOS this will be a bit more tricky, you will need the below repo to install mysql version 5.5 as by default you will only be able to install version mysql 5.1, so first we run:

  • CentOS 6

  • CentOS 5

Then we can start the installation, it is similar as before:

And the end result would be again similar as before:

That’s it for installing it, you will now need to make sure your mysql configuration is as you need it, although for most websites the default configuration will suffice. You will need to alter the configuration file which is in the location:


Start by increasing or adding the following variables:

The last two depend on the number of CPU cores your system has, eg. for a dual core, you use value 2. Then don’t foget to set your cache settings:

These are some sample values, it really depends on your system configuration yet again, don’t increase them too much or you’ll use all your ram! You can try using the shell script:

for a more better view on on your server usage and increase where necessary.

That’s it for now, see you again on our next article.

Request an article ←