RHEL6 ships with MySQL 5.1.52, but I do database development and need to test against the latest version. To get to 5.5.11 on my new RHEL6 server, I took the following steps:
STEP 1: Remove MySQL 5.1.52
I used the following commands to uninstall MySQL 5.1.52:
yum erase mysql
yum erase mysql-libs.x86_64
STEP 2: Download the RPM’s
I went to MySQL GA Downloads, selected RedHat from the dropdown list, then downloaded the following x64 RedHat RPMs: Client Utilities, Development Libraries, MySQL Server, Shared Components and Compatibility Libraries.
STEP3: Install the RPM’s
I then installed the five RPM’s, using the following commands:
rpm -ivh MySQL-devel-5.5.11-1.linux2.6.x86_64.rpm
rpm -ivh MySQL-shared-5.5.11-1.linux2.6.x86_64.rpm
rpm -ivh MySQL-shared-compat-5.5.11-1.linux2.6.x86_64.rpm
rpm -ivh MySQL-server-5.5.11-1.linux2.6.x86_64.rpm
rpm -ivh MySQL-client-5.5.11-1.linux2.6.x86_64.rpm
STEP 4: Start and update root password
After installing the above RPM’s, I started MySQL with:
service mysqld start
and checked the version with:
mysql --version
which returned:
mysql Ver 14.14 Distrib 5.5.11, for Linux (x86_64) using readline 5.1
I also checked to see what yum showed with:
yum list *mysql*
which returned:
Loaded plugins: refresh-packagekit, rhnplugin
Installed Packages
MySQL-client.x86_64 | 5.5.11-1.linux2.6 | installed |
MySQL-devel.x86_64 | 5.5.11-1.linux2.6 | installed |
MySQL-server.x86_64 | 5.5.11-1.linux2.6 | installed |
MySQL-shared.x86_64 | 5.5.11-1.linux2.6 | installed |
MySQL-shared-compat.x86_64 | 5.5.11-1.linux2.6 | installed |
compat-mysql55.x86_64 | 5.5.11-1.el6.remi | installed |
I then updated the root password with:
mysqladmin -u root password '******'
I got an error when I tried to start the server (first command in step 4):
$ sudo service mysql start
mysql: unrecognized service
The service is a daemon. Try this instead:
$ sudo service mysqld start
Try:
sudo service mysqld start
Thaks! great post.. very useful!
Indeed a nice tutorial for start. But, I am stuck during start. Its not working fine in my machine.
Whenever I try the command
service mysql start
I get following error.
Starting MySQL. ERROR! The server quit without updating PID file (/var/lib/mysql/rhel.mgmt.inkolcsm.egi.ericssion.local.pid)
Please help me out. Thank you in advance 🙂
can any body solve this
Crisp and clear, just what I needed. Worked like a charm. Thanks a lot.
One small point for anyone who faces this one problem that I faced. The installation of the MySQL-server-xxx package failed because of message bundle conflict with an earlier installation of MySQL-libs. I deleted the MySQL-libs installation, tried installing the server package again and it installed fine.