Running MySQL 4 and MySQL 5 Concurrently

Friday, June 20th, 2008

From Howtoforge.com’s article: Running MySQL 4 And MySQL 5 Concurrently

But I did in another way, because current release of CentOS / RHEL 5 already include MySQL 5 and I install MySQL 4 manually. I need a server with 2 MySQL version for development purpose: as current development is using MySQL 4 so I’ll configure it to use default port 3306 and for MySQL 5 will use port 3307.

First install CentOS with MySQL 5, afterthat configure MySQL 5 to use port 3307

# cp /usr/share/doc/mysql-server-5.0.22/my-medium.cnf /etc/my.cnf
# vi /etc/my.cnf
...
[client]
#password       = your_password
port            = 3307
socket          = /var/lib/mysql/mysql.sock

# Here follows entries for some specific programs
# The MySQL server
[mysqld]
port            = 3307
socket          = /var/lib/mysql/mysql.sock
...
# chkconfig mysqld on
# service mysqld start

To add new mysql user you can read “Adding mysql users“, to change mysql’s root password use:

# /usr/bin/mysqladmin -u root password 'newpassword'

Now we are going to install MySQL 4

(more…)

SocialTwist Tell-a-Friend