Installation of Mysql 5.5 on CentOS 5.x

This particular sub-entry focuses on installing MySQL 5.5 on CentOS 5.7.
For reference, CentOS ships with MySQL 5.0.77 by default, at the time of this entry (January 2012). This entry does not involve any migration and assumes a new server is being deployed. Nonstandard repos are required (remi and EPEL)

0. Login as root

1. Remove previously installed MySQL (if applicable)
yum erase mysql

2. Install additional repos

Navigate to temporary directory
cd /tempInstall EPEL repo
wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm

UPDATE 11 MAY 2012: The above URL is sporadic. Please use this alternative if the original does not work. – http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

rpm -Uvh epel-release-5-4.noarch.rpm

Install remi repo
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
rpm -Uvh remi-release-5.rpm

3. Ensure the repo contains MySQL 5.5
yum –enablerepo=remi list mysql mysql-server
4. Install MySQL 5.5
yum install –enablerepo=remi mysql*

5. Start MySQL and configure to start on boot
service mysqld start
chkconfig mysqld on 

6. Run mysql upgrade script
mysql_upgrade -u root -p

7. Change Mysql default Password 
/usr/bin/mysqladmin -u root password ‘yourpasswordhere’

8. Check to ensure mysql 5.5 is installed.
mysql –version

That’s it! MySQL 5.5 should now be installed. Dont forget to tune your server:
http://noveckg.blogspot.com/2011/04/some-mysql-database-tuning-from-non-dba.html

-noveck

8 thoughts on “Installation of Mysql 5.5 on CentOS 5.x”

  1. You are a saint.
    I have been bashing my head against the wall trying to get anything newer than 5.1 installed and I couldn't find a repo that had it. (linux is not a strongsuit).
    I'm running CentOS 6 (did oracle linux first) both using el6 so I just changed a few things in your doc to match – and bingo – 5.5.33.
    Thank you so much.

Comments are closed.