Applicable to:
- Plesk for Linux
Question
How to replace MariaDB 5.5 with Percona 5.5 on CentOS 7 on Plesk server?
Answer
Note: The best practice is to install Plesk on fresh server with Percona pre-installed in order to avoid issues during the upgrade to newer versions of Plesk.
Warning: The following scenario is not officially supported by Plesk. Use this instruction at your own risk.
-
Connect to the server using SSH.
-
Stop MariaDB service:
# service mariadb stop
-
Remove MariaDB packages without dependencies:
# rpm -e --nodeps mariadb mariadb-devel mariadb-libs mariadb-server
-
Install Percona repository:
# yum install https://www.percona.com/redir/downloads/percona-release/redhat/percona-release-0.1-4.noarch.rpm
-
Install Percona DB server:
# yum install Percona-Server-client-55 Percona-Server-server-55
-
Execute the following commands in order to load InnoDB plugin correctly for Percona DB server:
# mv /var/lib/mysql/ibdata1 /var/lib/mysql/ibdata1.bak
# cp -a /var/lib/mysql/ibdata1.bak /var/lib/mysql/ibdata1
# mv /var/lib/mysql/ib_logfile0 /var/lib/mysql/ib_logfile0.bak
# cp -a /var/lib/mysql/ib_logfile0.bak /var/lib/mysql/ib_logfile0
# mv /var/lib/mysql/ib_logfile1 /var/lib/mysql/ib_logfile1.bak
# cp -a /var/lib/mysql/ib_logfile1.bak /var/lib/mysql/ib_logfile1 -
Make sure that there are no processes listening on port 3306 and kill the process if any. For example:
# netstat -tulpn | grep 3306
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 4529/mysqld
# kill 4529 -
Start mysql service:
# service mysql start
-
Upgrade MySQL tables:
# mysql_upgrade -uadmin -p`cat /etc/psa/.psa.shadow`
-
(optional step) Percona XtraDB Cluster is distributed with several useful UDF (User Defined Function) from Percona Toolkit. To create these functions execute the following commands:
# plesk db -e "CREATE FUNCTION fnv1a_64 RETURNS INTEGER SONAME 'libfnv1a_udf.so'"
# plesk db -e "CREATE FUNCTION fnv_64 RETURNS INTEGER SONAME 'libfnv_udf.so'"
# plesk db -e "CREATE FUNCTION murmur_hash RETURNS INTEGER SONAME 'libmurmur_udf.so'" -
Restart mysql service:
# service mysql restart
Comments
0 comments
Please sign in to leave a comment.