Installing Percona Server for MySQL on Debian and Ubuntu 20.04

Ready-to-use packages are available from the Percona Server for MySQL software repositories and the download page.

Specific information on the supported platforms, products, and versions is described in Percona Software and Platform Lifecycle.

What’s in each DEB package?

The percona-server-server-5.7 package contains the database server itself, the MySQL binary, and associated files.

The percona-server-common-5.7 package contains files common to the server and client.

The percona-server-client-5.7 package contains the command-line client.

The percona-server-5.7-dbg package contains debug symbols for the server.

The percona-server-test-5.7 package contains the database test suite.

The percona-server-source-5.7 package contains the server source.

The libperconaserverclient20-dev package contains header files needed to compile software to use the client library.

The libperconaserverclient20 package contains the client shared library. The 20.04 is a reference to the version of the shared library. The version is incremented when there is an ABI change that requires software using the client library to be recompiled or its source code modified.

Installing Percona Server for MySQL from Percona apt repository

  1. Install GnuPG, the GNU Privacy Guard:
  1. $ sudo apt-get install gnupg2
  1. Fetch the repository packages from Percona web:
  1. $ wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb
  1. Install the downloaded package with dpkg. To do that, run the following commands as root or with sudo:
  1. $ sudo dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb
  1. Remember to update the local cache:
  1. $ sudo apt-get update
    • Once you install this package the Percona repositories should be added. You can check the repository setup in the /etc/apt/sources.list.d/percona-release.list file.
  1. After that you can install the server package:
  1. $ sudo apt-get install percona-server-server-5.7

Note

Percona Server for MySQL 5.7 comes with the TokuDB storage engine and MyRocks storage engine. These storage engines are installed as plugins.

For information on how to install and configure TokuDB, refer to the TokuDB Installation guide.

For information on how to install and configure MyRocks, refer to the Percona MyRocks Installation Guide guide.

The Percona Server for MySQL distribution contains several useful User Defined Functions (UDF) from Percona Toolkit. After the installation completes, run the following commands to create these functions:

mysql -e “CREATE FUNCTION fnvla_64 RETURNS INTEGER SONAME ‘libfnvla_udf.so'”

mysql -e “CREATE FUNCTION fnv_64 RETURNS INTEGER SONAME ‘libfnv_udf.so'”

mysql -e “CREATE FUNCTION murmur_hash RETURNS INTEGER SONAME ‘libmurmur_udf.so'”

For more details on the UDFs, see Percona Toolkit UDFS.

Percona apt Testing repository

Percona offers pre-release builds from the testing repository. To enable it, run percona-release with the testing argument. Run this command as root or by using the Sudo command.

$ sudo percona-release enable original testing

Apt-Pinning the packages

In some cases, you might need to “pin” the selected packages to avoid the upgrades from the distribution repositories. You’ll need to make a new file /etc/apt/preferences.d/00percona.pref and add the following lines in it:

Package: *

Pin: release o=Percona Development Team

Pin-Priority: 1001

For more information about pinning, you can check the official debian wiki.

Installing Percona Server for MySQL using downloaded deb packages

Download the packages of the desired series for your architecture from the download page. The easiest way is to download a bundle that contains all the packages. The following example will download Percona Server for MySQL 5.7.10-3 release packages for Debian 8.0:

$ wget https://www.percona.com/downloads/Percona-Server-5.7/Percona-Server-5.7.10-3/binary/debian/jessie/x86_64/Percona-Server-5.7.10-3-r63dafaf-jessie-x86_64-bundle.tar

You should then unpack the bundle to get the packages:

$ tar xvf Percona-Server-5.7.10-3-r63dafaf-jessie-x86_64-bundle.tar

After you unpack the bundle you should see the following packages:

$ ls *.deb

libperconaserverclient20-dev_5.7.10-3-1.jessie_amd64.deb

libperconaserverclient20_5.7.10-3-1.jessie_amd64.deb

percona-server-5.7-dbg_5.7.10-3-1.jessie_amd64.deb

percona-server-client-5.7_5.7.10-3-1.jessie_amd64.deb

percona-server-common-5.7_5.7.10-3-1.jessie_amd64.deb

percona-server-server-5.7_5.7.10-3-1.jessie_amd64.deb

percona-server-source-5.7_5.7.10-3-1.jessie_amd64.deb

percona-server-test-5.7_5.7.10-3-1.jessie_amd64.deb

percona-server-tokudb-5.7_5.7.10-3-1.jessie_amd64.deb

Now you can install Percona Server for MySQL by running:

$ sudo dpkg -i *.deb

This will install all the packages from the bundle. Another option is to download/specify only the packages you need for running Percona Server for MySQL installation (libperconaserverclient20_5.7.10-3-1.jessie_amd64.deb, percona-server-client-5.7_5.7.10-3-1.jessie_amd64.deb, percona-server-common-5.7_5.7.10-3-1.jessie_amd64.deb, and percona-server-server-5.7_5.7.10-3-1.jessie_amd64.deb. Optionally you can install percona-server-tokudb-5.7_5.7.10-3-1.jessie_amd64.deb if you want TokuDB storage engine).

Note

Percona Server for MySQL 5.7 comes with the TokuDB storage engine. You can find more information on installing and enabling the TokuDB storage in the TokuDB Installation guide.

Warning

When installing packages manually like this, you’ll need to make sure to resolve all the dependencies and install missing packages yourself. Following packages will need to be installed before you can manually install Percona Server: mysql-common, libjemalloc1, libaio1, and libmecab2

The following table lists the default locations for files:

FilesLocation
mysqld server/usr/sbin
Configuration/etc/mysql/my.cnf
Data directory/var/lib/mysql
Logs/var/log/mysql

Note

Debian and Ubuntu installation does not automatically create a special Debian-sys-maint user which can be used by the control scripts to control the Percona Server for MySQL mysqld and mysqld_safe services like was the case with previous Percona Server for MySQL versions. If you still require this user you must create the user manually.

Running Percona Server for MySQL

The following procedure runs the Percona Server for MySQL:

  1. Starting the service

Percona Server for MySQL starts automatically after installation unless the server encounters errors during the installation process. You can also manually start it by running the following command:

$ sudo service mysql start

  1. Confirming the service is running

You can verify the service status by running the following command:

$ service mysql status

  1. Stopping the service

You can stop the service by running the following command:

$ sudo service mysql stop

  1. Restarting the service

You can restart the service by running the following command:

$ sudo service mysql restart

Note

Debian 8.0 (Jessie) and Ubuntu 16.04(Xenial) come with systemd as the default system and service manager so you can invoke all the above commands with sytemctl instead of service. Currently, both are supported.

Uninstalling Percona Server for MySQL

To uninstall Percona Server for MySQL, you must remove all of the installed packages.

You have the following options:

  • Removing packages with apt-get remove leaves the configuration and data files.
  • Removing the packages with apt-get purge removes all the packages with configuration files and data files (all the databases).

Depending on your needs, you can choose which command better suits you.

See also

apt-get

  1. Stop the Percona Server for MySQL service
  1. $ sudo service mysql stop
  1. Remove the packages
    1. Remove the packages. This option does not delete the configuration or data files. If you do not require these files, you must delete each file manually.
  1. $ sudo apt-get remove ‘percona-server*’
    • Purge the packages. This option deletes packages, configuration, and data files. The option does not delete any configuration or data files stored in your home directory. You may need to delete some files manually.
  1. $ sudo apt-get purge ‘percona-server*’
  1. $ sudo apt-get autoremove -y
  1. $ sudo apt-get autoclean
  1. $ sudo rm -rf /etc/mysql

Note

In a regular expression, the * (asterisk) matches zero or more of the preceding item. The single quotes prevent the shell from misinterpreting the asterisk as a shell command.

If you do not plan to upgrade, run the following commands to remove the data directory location:

 rm -rf /var/lib/mysql

 rm -rf /var/log/mysql

$ sudo apt-get purge percona-server*

Conclusion

In under 15 minutes, we went through the installation process of Percona Server 5.7 and created a new user for use in your application. This can give immediate improvement over using MySQL Server with very little effort.

This Post Has 119 Comments

  1. ‏lewdle

    I really like and appreciate your blog post.Really thank you! Will read on…

  2. other

    I truly love your website.. Excellent colors & theme. Did you make this website yourself? Please reply back as I’m attempting to create my own blog and want to find out where you got this from or just what the theme is named. Thank you!

  3. More hints

    Very good article! We will be linking to this particularly great content on our site. Keep up the great writing.

  4. download lagu

    I really like looking through a post that will make men and women think. Also, thanks for permitting me to comment.

  5. porn

    bookmarked!!, I really like your site.

  6. mp3juice

    You’re so cool! I do not think I have read a single thing like this before. So wonderful to find another person with genuine thoughts on this issue. Seriously.. many thanks for starting this up. This site is one thing that is needed on the internet, someone with some originality.

  7. Snaptik.vin

    Good post. I am dealing with a few of these issues as well..

  8. Superslot

    I am so grateful for your article.Much thanks again. Keep writing.

  9. avanda.id

    You made some really good points there. I checked on the net for more information about the issue and found most people will go along with your views on this web site.

  10. mp3juices

    After I initially commented I appear to have clicked the -Notify me when new comments are added- checkbox and from now on every time a comment is added I get four emails with the same comment. Is there an easy method you can remove me from that service? Kudos.

  11. fakaza

    Pretty! This has been a really wonderful article. Thank you for providing this information.

  12. visit this page

    You need to take part in a contest for one of the highest quality sites on the web. I most certainly will highly recommend this site!

  13. Porn

    Can I just say what a comfort to uncover a person that really understands what they’re talking about on the web. You actually realize how to bring a problem to light and make it important. More and more people need to read this and understand this side of your story. I was surprised that you are not more popular given that you certainly have the gift.

  14. porn

    Hey there! I just would like to give you a big thumbs up for your excellent information you have here on this post. I will be coming back to your blog for more soon.

  15. I truly love your website.. Great colors & theme. Did you develop this site yourself? Please reply back as Iím wanting to create my very own blog and would like to find out where you got this from or just what the theme is called. Many thanks!

  16. Really appreciate you sharing this blog post.Really looking forward to read more. Much obliged.

  17. porn

    I blog often and I seriously appreciate your information. This article has truly peaked my interest. I will bookmark your website and keep checking for new details about once per week. I opted in for your Feed as well.

  18. original site

    I loved your article post.Much thanks again. Really Great.

  19. 카지노총판

    Very neat article post.Really looking forward to read more. Fantastic.

  20. fakaza

    Right here is the right webpage for everyone who wishes to understand this topic. You realize so much its almost tough to argue with you (not that I personally will need to…HaHa). You certainly put a brand new spin on a subject which has been written about for a long time. Great stuff, just wonderful.

  21. Fakaza

    I blog quite often and I truly appreciate your content. This great article has really peaked my interest. I’m going to book mark your blog and keep checking for new information about once a week. I subscribed to your Feed too.

  22. 카지노총판

    Thanks for sharing, this is a fantastic post.Really thank you! Really Cool.

  23. look what i found

    This site was… how do you say it? Relevant!! Finally I’ve found something which helped me. Appreciate it.

  24. my website

    I couldn’t refrain from commenting. Exceptionally well written.

  25. one piece

    I appreciate you sharing this article.Really looking forward to read more. Really Great.

  26. malsom herre

    Say, you got a nice blog article.Thanks Again. Great.

  27. mp3

    Good information. Lucky me I ran across your site by accident (stumbleupon). I have book marked it for later.

  28. Dåpsgave

    I am so grateful for your post.Really looking forward to read more. Fantastic.

  29. engraved ring

    Appreciate you sharing, great post.Really thank you! Really Cool.

  30. Beranda

    You need to be a part of a contest for one of the finest blogs on the net. I most certainly will highly recommend this web site!

  31. situs web mereka

    Spot on with this write-up, I seriously believe this site needs a lot more attention. I’ll probably be returning to see more, thanks for the info.

  32. news

    I absolutely love your website.. Excellent colors & theme. Did you build this site yourself? Please reply back as I’m hoping to create my own personal site and want to learn where you got this from or just what the theme is called. Many thanks.

  33. HijabyZakia

    I truly love your site.. Pleasant colors & theme. Did you make this amazing site yourself? Please reply back as I’m looking to create my own site and would love to find out where you got this from or just what the theme is named. Kudos!

  34. asake loaded mp3

    Good web site you have got here.. It’s hard to find excellent writing like yours these days. I seriously appreciate individuals like you! Take care!!

  35. Can I just say what a comfort to uncover somebody who genuinely understands what they are discussing over the internet. You actually realize how to bring an issue to light and make it important. More and more people must check this out and understand this side of the story. I was surprised that you aren’t more popular since you surely possess the gift.

  36. mp3 quack

    Oh my goodness! Awesome article dude! Thank you so much, However I am encountering difficulties with your RSS. I don’t know why I can’t join it. Is there anyone else having the same RSS issues? Anybody who knows the solution will you kindly respond? Thanx!!

  37. 4dresult

    Really informative article post.Really thank you! Great.

  38. This is a topic that’s near to my heart… Thank you! Where can I find the contact details for questions?

  39. official website

    There is certainly a lot to learn about this subject. I like all the points you’ve made.

  40. pavers livermore

    Thank you for your blog article.Really looking forward to read more. Keep writing.

  41. Your style is very unique compared to other folks I’ve read stuff from. I appreciate you for posting when you have the opportunity, Guess I’ll just book mark this web site.

  42. useful source

    It’s hard to find experienced people in this particular subject, however, you seem like you know what you’re talking about! Thanks

  43. Hi there, I think your website could be having internet browser compatibility problems. Whenever I take a look at your blog in Safari, it looks fine but when opening in Internet Explorer, it has some overlapping issues. I simply wanted to provide you with a quick heads up! Aside from that, great website.

  44. this article

    Major thankies for the article.Really thank you! Awesome.

  45. visit

    Im thankful for the article. Will read on…

  46. mp3quack

    When I originally left a comment I appear to have clicked the -Notify me when new comments are added- checkbox and from now on whenever a comment is added I receive 4 emails with the exact same comment. There has to be an easy method you can remove me from that service? Appreciate it.

  47. apple crumble

    Hey, thanks for the blog article.Really thank you! Much obliged.

  48. Next time I read a blog, I hope that it does not fail me just as much as this particular one. After all, I know it was my choice to read, nonetheless I genuinely thought you would probably have something interesting to say. All I hear is a bunch of moaning about something that you could possibly fix if you weren’t too busy looking for attention.

  49. Nice post. I learn something totally new and challenging on sites I stumbleupon every day. It’s always exciting to read content from other authors and use something from their web sites.

  50. info lebih lanjut

    This website was… how do you say it? Relevant!! Finally I have found something that helped me. Appreciate it.

  51. Can I just say what a relief to uncover an individual who actually understands what they’re talking about on the internet. You actually know how to bring a problem to light and make it important. A lot more people really need to look at this and understand this side of your story. I can’t believe you’re not more popular because you definitely have the gift.

  52. mp3 download

    I was more than happy to discover this great site. I need to to thank you for your time due to this wonderful read!! I definitely liked every part of it and i also have you saved as a favorite to see new things in your site.

  53. rv by my location

    You need to be a part of a contest for one of the best websites on the web. I most certainly will highly recommend this web site!

  54. Hair Care

    Hi, I do think this is an excellent website. I stumbledupon it 😉 I will revisit yet again since i have bookmarked it. Money and freedom is the greatest way to change, may you be rich and continue to guide other people.

  55. Tubidy

    Pretty! This was a really wonderful article. Thank you for providing this information.

  56. Greetings! Very helpful advice within this article! It is the little changes that produce the largest changes. Many thanks for sharing!

  57. you can try here

    I truly love your blog.. Pleasant colors & theme. Did you build this site yourself? Please reply back as I’m looking to create my own personal blog and would like to know where you got this from or just what the theme is named. Cheers!

  58. bali blinds

    I really enjoy the blog article.Much thanks again. Want more.

  59. huge dildo

    Appreciate you sharing, great article.Thanks Again. Want more.

  60. dick pump

    Very informative blog article.Really looking forward to read more. Fantastic.

Leave a Reply

WC Captcha 74 − 72 =