Page 1 of 1

New Percona instructions

Posted: Thu Jun 01, 2017 6:52 pm
by BBuchanan1013
Hey y'all, I had to put this out there. The Percona instructions for:

Ubuntu 16.04 need to be changed/modified

I have gone through 2 complete re-installs of the OS due to slight issues. I also suggest that this be done on a new install of Vesta.

Ubuntu 16 aka Xenial installs php 7 and MySQL 5.7 <- that's important to remember. VestaCP instructions call for 5.5 on percona. Well, 5.5 and 5.7 have so many changes it's not even funny. This was the cause of numerous headaches. Oh, and the gpg key needs to be changed/updated. Here's how:

Assuming your root (if not add sudo before all commands)
1. Start with the GPG key

Code: Select all

user@server: apt-key adv --keyserver keys.gnupg.net --recv-keys 8507EFA5
2.Add percona Repo

Code: Select all

user@server: echo "deb http://repo.percona.com/apt xenial main" >> /etc/apt/sources.list
user@server: echo "deb-src http://repo.percona.com/apt xenial main" >> /etc/apt/sources.list
3. Install Percona 5.7 <- very important, 5.5 will give massive headaches and will not start correctly if at all

Code: Select all

user@server: apt-get update
user@server: apt-get install percona-server-server-5.7 percona-server-client-5.7 -y
user@server: apt-get autoremove -y
user@server: apt-get clean all
During the install it will ask for the root mysql password. If you don't want to change it, don't enter anything, just press enter. It will ask at least twice.

Then at the end of the install, it will tell your to run commands such as:

Code: Select all

 
user@server: mysql -e "CREATE FUNCTION fnv1a_64 RETURNS INTEGER SONAME 'libfnv1a_udf.so'"
user@server: mysql -e "CREATE FUNCTION fnv_64 RETURNS INTEGER SONAME 'libfnv_udf.so'"
user@server: mysql -e "CREATE FUNCTION murmur_hash RETURNS INTEGER SONAME 'libmurmur_udf.so'"
These are nothing more than useful functions from the Percona Toolkit. It doesn't hurt anything to run the commands.

4.Finally, update the rc

Code: Select all

user@server: update-rc.d mysql default
If you've had no problems to this point, congrats, it's installed. Lets check it:

Code: Select all

user@server: systemctl status mysql
or

Code: Select all

user@server: service mysql status
As long as it's running, it's installed perfectly fine. Your good to go, congrats on swapping to Percona.

Re: New Percona instructions

Posted: Mon Aug 21, 2017 1:00 pm
by emielm
Hi, I tried this several times on a freshly installed Ubuntu 16.04 server, but I keep getting this error on PerconaDB setup:

https://www.imgpaste.net/image/DEh7P

After continuing, the install is aborted and right after unpacking the installation package:

Code: Select all

Preparing to unpack .../percona-server-common-5.7_5.7.18-16-1.xenial_amd64.deb ...
Unpacking percona-server-common-5.7 (5.7.18-16-1.xenial) ...
this error is shown:

Code: Select all

dpkg: error processing archive /var/cache/apt/archives/percona-server-common-5.7_5.7.18-16-1.xenial_amd64.deb (--unpack):
 trying to overwrite '/usr/share/mysql/errmsg-utf8.txt', which is also in package mysql-server-5.7 5.7.19-0ubuntu0.16.04.1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/percona-server-common-5.7_5.7.18-16-1.xenial_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Any idea what might be the cause of this? I also tried installing PerconaDB before installing VestaCP succesfully a few times, so this only occurs with VestaCP installed.

Thanks for any thoughts!

Re: New Percona instructions

Posted: Thu Oct 18, 2018 8:59 am
by jodumont
I know it's a old post but

I would like to add few things to succeed well with this operation

1. BACKUP, at least your DB

2. remove mysql/mariadb before trying to install percona

Code: Select all

apt remove --purge mariadb*
3. install percona

Code: Select all

curl -fsSLo /tmp/percona.deb https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb
dpkg -i /tmp/percona.deb
apt update
lastPercona=$(apt search percona-server-server-|grep "percona-server-server-"|cut -d'/' -f1|tail -1|rev|cut -d- -f1|rev)
apt install -y percona-server-server-$lastPercona percona-server-client-$lastPercona
4. restore your DB