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.
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.