How to Upgrade MySQL with Plesk on Redhat Enterprise Server

Warning: The author and this blog will not be held liable for any losses due to following this guide, proceed at your own risk.

Plesk MySQL

Uprading MySQL with plesk is not that hard as it sounds and this guide will prove it to you. Below are the steps you need to execute to upgrade your current MySQL version to the latest release. In this guide, we will going to use MySQL version 4.1 but other versions will work as well.

Backup the following files and directory before doing any of the steps below.

/var/lib/mysql - directory where mysql data is stored.

/etc/my.cnf - default mysql configuration file.

/etc/init.d/mysqld - mysql initialization script.

1. Download the pre-compiled MySQL server binaries.

wget -c http://dev.mysql.com/get/Downloads/MySQL-4.1/mysql-standard-4.1.22-pc-linux-gnu-i686-icc-glibc23.tar.gz/from/http://mirror.services.wisc.edu/mysql/

2. Move and decompress the download file.

mv mysql-standard-4.1.22-pc-linux-gnu-i686-icc-glibc23.tar.gz /usr/local/

cd /usr/local

tar -vxzf mysql-standard-4.1.22-pc-linux-gnu-i686-icc-glibc23.tar.gz

3. Create a symbolic link of the decompressed files folder to MySQL folder.

ln -s /usr/local/mysql-standard-4.1.22-pc-linux-gnu-i686-icc-glibc23 mysql

4. Edit the mysqld rc file under /etc/init.d

vi /etc/init.d/mysqld

change the mysql server path from /usr/bin to /usr/local/mysql/bin (e.g /usr/local/mysql/bin/safe_mysqld)

5. Add the following lines to the my.cnf file.

[mysqladmin]
socket=/var/lib/mysql/mysql.sock

[mysql]
socket=/var/lib/mysql/mysql.sock [mysql_fix_privilege_tables]
socket=/var/lib/mysql/mysql.sock

6. Stop and Start MySQL server process.

service stop mysqld

service start mysqld

7. Verify that you are able to connect to the mysql server.

mysql -u admin -p your_plesk_admin_password

mysql> select version();
+—————–+
| version() |
+—————–+
| 4.1.22-standard |
+—————–+
1 row in set (0.00 sec)

That’s all about it, if you encounter any errors just drop a message via the comment box.

Filed under by

Spread the word

del.icio.us Digg Furl Google StumbleUpon Technorati Windows Live Yahoo! Help

Permalink • Print • Comment

2 Comments on How to Upgrade MySQL with Plesk on Redhat Enterprise Server »

Lito @ 1:28 pm:

Hi Batman,

Can you also upgrade PHP within Plesk?

Thank you.

richard timm @ 1:51 pm:

I was hoping you might be able to help me out i have a server (server 2008 64bit plesk 9.5.2) i believe it uses msqli i have just had a custom site made for me that uses msql.

Is there a module for msqli convert to msql or something?

Thanks

Rich