5/31/2011

replace mysql-server with percona server

what is percona-server:

Quote:
Percona Server is an enhanced drop-in replacement for MySQL. With Percona Server,

Your queries will run faster and more consistently.
You will consolidate servers on powerful hardware.
You will delay sharding, or avoid it entirely.
You will save money on hosting fees and power.
You will spend less time tuning and administering.
You will achieve higher uptime.
You will troubleshoot without guesswork.

Does this sound too good to be true? It's not. Percona Server offers breakthrough performance, scalability, features, and instrumentation. Its self-tuning algorithms and support for extremely high-performance hardware make it the clear choice for companies who demand the utmost performance and reliability from their database server


now if you want to have such miracle on your cpanel server you need to do this steps for replacing mysql-server with percona-server:

1. backup VPS.
2. dump all dbs.
3. stop all services on the vps
Code:
/etc/init.d/httpd stop ; /etc/init.d/exim stop ; /etc/init.d/pure-ftpd stop ; /etc/init.d/dovecot stop ; /etc/init.d/cpanel stop ; /etc/init.d/lfd stop ; /etc/init.d/munin-node stop ; /etc/init.d/crond stop ; /etc/init.d/mysql stop ; /etc/init.d/exim stop ;


4. make sure that everything is stopped
5. check what mysql packages are installed

Code:
rpm -qa | grep -i mysql


in my case it was MySQL-client MySQL-devel MySQL-test MySQL-bench MySQL-shared MySQL-server
so I run this command to completely remove mysql from vps
Code:
yum remove MySQL-client MySQL-devel MySQL-test MySQL-bench MySQL-shared MySQL-server


6. add percona repo

Code:
rpm -Uhv http://www.percona.com/downloads/percona-release/percona-release-0.0-1.x86_64.rpm


7. check what packages are available in percona repo

Code:
yum list | grep percona


should be something like

Code:
# yum list | grep percona
percona-release.x86_64                    0.0-1                        installed
Percona-SQL-50-debuginfo.x86_64           5.0.92-b23.85.rhel5          percona
Percona-SQL-client-50.x86_64              5.0.92-b23.85.rhel5          percona
Percona-SQL-devel-50.x86_64               5.0.92-b23.85.rhel5          percona
Percona-SQL-server-50.x86_64              5.0.92-b23.85.rhel5          percona
Percona-SQL-shared-50.x86_64              5.0.92-b23.85.rhel5          percona
Percona-SQL-shared-compat.x86_64          5.1.43-2                     percona
Percona-SQL-test-50.x86_64                5.0.92-b23.85.rhel5          percona
Percona-Server-51-debuginfo.x86_64        5.1.56-rel12.7.224.rhel5     percona
Percona-Server-55-debuginfo.x86_64        5.5.11-rel20.2.115.rhel5     percona
Percona-Server-client-51.x86_64           5.1.56-rel12.7.224.rhel5     percona
Percona-Server-devel-51.x86_64            5.1.56-rel12.7.224.rhel5     percona
Percona-Server-server-51.x86_64           5.1.56-rel12.7.224.rhel5     percona
Percona-Server-shared-51.x86_64           5.1.56-rel12.7.224.rhel5     percona
Percona-Server-test-51.x86_64             5.1.56-rel12.7.224.rhel5     percona
gnuplot.x86_64                            4.2.6-14                     percona
gnuplot-emacs.x86_64                      4.2.6-14                     percona
maatkit.noarch                            7284-1                       percona
xtrabackup.x86_64                         1.6-245.rhel5                percona
xtrabackup-debuginfo.x86_64               1.6-245.rhel5                percona


8. decide what version you need 5.1 or 5.5
in my case I've installed percona 5.5

Code:
# rpm -qa | grep Percona
Percona-Server-client-55-5.5.11-rel20.2.115.rhel5
Percona-Server-server-55-5.5.11-rel20.2.115.rhel5
Percona-Server-shared-55-5.5.11-rel20.2.115.rhel5
Percona-Server-shared-compat-5.5.11-rel20.2.115.rhel5
Percona-Server-devel-55-5.5.11-rel20.2.115.rhel5
Percona-Server-test-55-5.5.11-rel20.2.115.rhel5


9. after Percona-server installation it is necessary to check if it started correctly as some variables in my.cnf are not supported.
10. after successful start it is necessary to run mysql_upgrade.
11. for finishing installation run easyapache and recompile apache/php/etc
12. Go to Server Configuration -> Update Config and set MySQL to "never", save, double check it has been done
13. Test new Apache to be sure server is working

No comments: