First step is to check if there are any version of mysql already installed. This is due to the fact that RHEL has some default packages available already. Do this.
rpm –qa |grep mysql
Printed are a list of mysql server installed, clients and drivers like perl DBD driver, python driver and other stuff. Best idea is to get rid of all these dependencies and build it again. That can be done by
rpm –e < mysql-server-5.0.45-7.el5>
rpm –e < libdbi-dbd-mysql-0.8.1a-1.2.2
…..and so on.
Try installing MySQL server 5.1 from MySQL mirror website itself. It would automatically start the server once successfully installed. ‘root’ is the default user id with a blank password. Root’s password can be changed once client package is installed which includs mysql and mysqladmin and other administrative tools.
rpm –i http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-server-community-5.1.24-0.rhel5.i386.rpm/from/http://mirror.trouble-free.net/mysql_mirror/
Try installing MySQL clients packages which include administrative tools like mysql, mysqladmin, mysqldump and others…..
rpm –i http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-client-community-5.1.24-0.rhel5.i386.rpm/from/http://mirror.trouble-free.net/mysql_mirror/
Change root user password or simply execute /usr/bin/mysql_secure_installation. Answer all the questions appropriately. That’s it.
Check if mysql is running by doing: ps –eaf|grep mysqld
Also try connecting to it by doing.
mysql –uroot –p
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 38
Server version: 5.1.24-rc-community MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show databases;
| Database |
| information_schema |
| mysql |
| mysqlDB |
| test |
4 rows in set (0.00 sec)
====== Now, you are all set =====================
DO NOT FORGET TO RE-INSTALL DRIVERS FOR CLIENTS LIKE PERL, PYTHON, PHP.