Percona, which started out as a fork of MySQL, now offers a myriad of services — like advisory and technical services — to enterprises operating worldwide. On the other hand, MySQL is a database management system that allows users to manage relational databases.
Percona Server for MySQL is an open-source drop-in, fully compatible replacement for the MySQL database.
Percona Server for MySQL is known for delivering better performance and scalability options to its users.
It has gained the trust of thousands of enterprises; hence, becoming the go-to choice for their default relational database management system.
Percona also offers a suite of free-to-use application servers to its users for which they have to pay to use in MySQL.
From its inception, Percona Server has acted out as a helpful assistant because with scale managing MySQL databases turn trickier.
Another central selling point that goes in favor of Percona Server for MySQL is its high compatibility with MySQL, focusing on improving performance, development processes, and scalability operations.
In short, Percona Server for MySQL should be treated as an upgrade over MySQL.
In this tutorial article, we will talk about the Percona MySQL Integration process to make the migration process seamless. Let’s begin.
Table of Contents
- What is Percona Server?
- Percona Server for MySQL 8.0.28-19 Installation Process
- Installing Percona Server for MySQL from Repositories (Recommended)
- Installing Percona Server for MySQL from a Binary Tarball
- Installing Percona Server for MySQL from a Source Tarball
- Installing Percona Server for MySQL from the Git Source Tree
- Compiling Percona Server for MySQL from Source
- Building Percona Server for MySQL Debian/Ubuntu packages
- Post Installation
- Frequently Asked Questions (FAQs)
What is Percona Server?
Percona Server for MySQL — developed by Percona — is an open-source, fully compatible drop-in replacement for MySQL relational database management system (RDMS) with over 5,300,000 downloads.
Percona is popular among the Developers’ community because of its superior performance, on-the-fly scalability, and compatibility with modern hardware and cloud computing.
Given the advantage accompanied by other free features such as the XtraDB Cluster and the XtraDB Backup, Developers don’t have to worry about the scalability and migration aspect in Percona Server when scaling up.
Other than that, the Percona Server clients enjoy a synchronous version update cycle with MySQL. This means a great deal if you are planning to migrate to Percona from MySQL.
On the other hand, XtraDB proves highly advantageous when it comes to scalability operations when there is a sudden or gradual increase in the data volume.
The XtraDB Clusters allow an increase in the number of nodes used to three or more. This results in better and more consistent operations and no loss of data.
Manage MySQL Database Better With Hevo’s No-code Data Pipeline!
Hevo Data, a No-code Data Pipeline, helps you directly transfer data from 100+ data sources to Data Warehouses, BI tools, or a destination of your choice in a completely hassle-free & automated manner.
Hevo is fully managed and completely automates the process of not only loading data from your desired source but also enriching the data and transforming it into an analysis-ready form without having to write a single line of code.
Its fault-tolerant architecture ensures that the data is handled in a secure, consistent manner with zero data loss.Get Started with Hevo for Free
Percona Server for MySQL 8.0.28-19 Installation Process
This section presents step by step procedure to set up the Percona MySQL Integration. In total, we will discuss four methods and two after notions for compiling and running the Percona Server for MySQL from Source and Docker Container, respectively. Let’s begin.
Installing Percona Server for MySQL from Repositories (Recommended)
Installing Percona Server from Repositories is the recommended way and must be deployed where ever possible (as mentioned in the Percona Documentation).
For Percona Server for MySQL, Percona XtraBackup, and Percona Toolkit, Percona provides repositories such as yum and apt.
These additional features make it extremely easy when installing the software and its dependencies through the package manager of your operating system.
To know the installation process for .deb and .rpm packages, either of these two guides can help:
- Installing Percona Server for MySQL on Debian and Ubuntu
- Installing Percona Server for MySQL on Red Hat Enterprise Linux and CentOS
Installing Percona Server for MySQL from a Binary Tarball
For installation in Percona Server for MySQL version 8.0.20-11 and later, you will have to select the Percona Server for MySQL 8.0 version number and the tarball type.
Percona has replaced some binary tarballs from the earlier versions, as shown in the table below:
|Full||Percona-Server-<version number>-Linux.x86_64.glibc2.12.tar.gz||Built for CentOS 6||Contains binaries, libraries, test files, and debug symbols|
|Minimal||Percona-Server-<version number>-Linux.x86_64.glibc2.12-minimal.tar.gz||Built for CentOS 6||Contains binaries and libraries but does not include test files, or debug symbols|
|Full||Percona-Server-<version number>-Linux.x86_64.glibc2.17.tar.gz||Compatible with any supported operating system except for CentOS 6||Contains binaries, libraries, test files, and debug symbols|
|Minimal||Percona-Server-<version number>-Linux.x86_64.glibc2.17-minimal.tar.gz||Compatible with any supported operating system except for CentOS 6||Contains binaries and libraries but does not include test files or debug symbols|
Below provided are tables for the My Rocks ZenFS installation in Pecona for MySQL version 8.0.26-16. For more information on the Percona MySQL installation and configuration on Percona Server for MySQL with ZenFS support, see this document.
|Full||Percona-Server-<version number>-Linux.x86_64.glibc2.31-zenfs.tar.gz||Contains the binaries, libraries, test files, and debug symbols|
|Minimal||Percona-Server-<version number>-Linux.x86_64.glibc2.31-zenfs-minimal.tar.gz||Contains the binaries and libraries but does not include test files or debug symbols|
If in case, you haven’t enabled the ZenFS functionality on Ubuntu 20.04, the binaries can run on the standard 5.4 kernel.
Note: Percona does not provide installation for other Linux distributions but Linux is added for ZenFS.
Mentioned below are some tarballs provided based on the OpenSSL library in Percona Server for MySQL before 8.0.20-11:
ssl100 - for Debian prior to 9 and Ubuntu prior to 14.04 versions (libssl.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0); ssl102 - for Debian 9 and Ubuntu versions starting from 14.04 (libssl.so.1.1 => /usr/lib/libssl.sl.1.1) ssl101 - for CentOS 6 and CentOS 7 (libssl.so.10 => /usr/lib64/libssl.so.10); ssl102 - for CentOS 8 and RedHat 8 (libssl.so.1.1 => /usr/lib/libssl.so.1.1.1b);
From the Linus – Generic on the download section, you can download the binary tarballs
Below given is an example of how to fetch the correct binary tarball for Debian10:
$ wget https://downloads.percona.com/downloads/Percona-Server-8.0/Percona-Server-8.0.26-16/binary/tarball/Percona-Server-8.0.26-16-Linux.x86_64.glibc2.12.tar.gz
Installing Percona Server for MySQL from a Source Tarball
Using the code example below, you can fetch and extract the source tarball.
$ wget https://downloads.percona.com/downloads/Percona-Server-8.0/Percona-Server-8.0.26-16/binary/tarball/Percona-Server-8.0.26-16-Linux.x86_64.glibc2.12.tar.gz $ tar xfz Percona-Server-8.0.26-16-Linux.x86_64.glibc2.12.tar.gz
You can follow the link to the document “Compiling Percona Server for MySQL from Source” to execute the steps afterward for the Percona MySQL installation and configuration process on Percona Server for MySQL from the source.
Installing Percona Server for MySQL from the Git Source Tree
To develop, Percona uses the Github revision control system. You would require to install git on your system to build the latest Percona Server for MySQL.
To summon the latest Percona Server for MySQL 8.0 sources, you can execute the source code given below:
$ git clone https://github.com/percona/percona-server.git $ cd percona-server $ git checkout 8.0 $ git submodule init $ git submodule update
To generate a new source tarball, run the source code given below if the need arises to make changes to Percona Server for MySQL 8.0.
$ cmake . $ make dist
Follow the instructions given in the Documentation, “Compiling Percona Server for MySQL from Git Source” to execute the steps afterward for the Percona MySQL installation and configuration process on Percona Server for MySQL from Git source.
Compiling Percona Server for MySQL from Source
To proceed to compile Percona Server for MySQL from Source, first, you will need to configure and build Percona Server for MySQL.
Note: Make sure the GCC installed in your system is of at least the 4.9 release.
Step 1: Run CMake and configure the build. Below is an example of source code that configures lines similar to the options that Percona uses to produce binaries.
Note: In this section, don’t forget to mention the build options for a normal MySQL build.
$ cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_CONFIG=mysql_release -DFEATURE_SET=community
Step 2: Use “make” to compile
Step 3: Now, install. And that’s it.
$ make install
Building Percona Server for MySQL Debian/Ubuntu packages
First, start with a source tarball first if you want to build your own Debian/Ubuntu (dpkg) packages of Percona Server for MySQL.
Use the instructions given in the Documentation, “Installing Percona Server for MySQL from the Git Source Tree.”
Step 1: First, the source tarball is needed to be extracted:
$ tar xfz Percona-Server-8.0.13-3-Linux.x86_64.ssl102.tar.gz $ cd Percona-Server-8.0.13-3
Step 2: The Debian packaging needs to be in the directory in which Debian expects it to be.
$ cp -ap build-ps/debian debian
Step 3: Next, you need to update the changelog for your distribution.
$ dch -D unstable --force-distribution -v "8.0.13-3-1" "Update to 8.0.13-3"
Step 4: Follow the source code given below to build the Debian source package:
$ dpkg-buildpackage -S
Step 5: Now, use the build feature to build the binary package in a chroot:
$ sbuild -d sid percona-server-8.0_8.0.13-3-1.dsc
Once you have installed the Precona Server for MySQL, you have to do the following:
Step 1: Initializing the Data Directory
The data directory is not populated if you install the server using either the source distribution or generic binary distribution files, and you must conduct the initialization process after installation.
Use the -initialize or the initialize-insecure option to run mysqld.
When you run mysqld with either option, the following happens:
- Verifies whether the data directory exists.
- Initializes the system tablespace and associated structures.
- System tables, such as grant tables, time zone tables, and server-side assistance tables, are created.
- It creates root@localhost
The following steps should be run with the MySQL login
- Go to the MySQL directory. The default location is used in the example.
$ cd /usr/local/MySQL
- Make a directory for MySQL files. The directory path is used as a value by secure_file_priv.
$ mkdir mydata
- To initialize the data directory, run the command.
$ bin/mysqld --initialize
Step 2: Secure the Installation
The mysql_secure_installation script enhances installation security.
When you run the script, it accomplishes the following:
- The root password is changed.
- Root accounts are not allowed to log in remotely.
- Anonymous users are removed.
- The test database is deleted.
- The privilege tables are reloaded.
The following statement runs the script:
Step 3: Testing the Server
The server begins after a generic binary installation. The following command verifies the status of the server:
$ sudo service mysql status
Use the following command to connect to the server:
$ mysql -u root -p
Step 4: Configuring the Server to Start as Startup
Systemd is used to administer the server. If you installed the server from a generic binary distribution on a systemd-enabled operating system, you can manually setup systemd support.
The following commands start, verify the server’s status, and end it:
$ systemctl start mysql $ systemctl status mysql $ systemctl stop mysql
To have the server start startup, run the following:
systemctl enable mysql
Step 5: Testing the Server
You may perform tests on the server after you have initialized the data directory and launched it.
This section assumes you used the default installation settings. Navigate to the installation location if you have modified it. Setting the Environment Variables allows you to add the location as well.
To access the server, use the mysqladmin client.
If you are having trouble connecting to the server, use the root user and the root account password.
$ sudo mysqladmin -u root -p version
To view database and table details, use mysqlshow.
$ sudo mysqlshow -u root -p
Step 6: Populating the Time Zone Tables
The following are the time zone system tables:
When you install the server using either the source distribution or the generic binary distribution files, the time zone tables are created but not populated.
The mysql_tzinfo_to_sql function populates the tables with data from the zoneinfo directory that is available in Linux.
Adding the zoneinfo directory path to MySQL tzinfo to sql and then sending the output into the mysql system schema is a common way to populate the tables.
The following example assumes you are running the command as root. The account must be granted the ability to edit the MySQL system schema.
$ mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p -D mysql
Frequently Asked Questions (FAQs)
What is Precona Distribution?
Percona Distribution for MySQL is a unified solution that combines the best and most crucial enterprise components from the MySQL open source community, all of which have been developed and tested to function together.
By utilizing the distribution, you obtain the exact mix of software and tools needed to properly deploy, run, and operate your MySQL databases to satisfy your application and business goals.
What is Percona Cluster?
Percona XtraDB Cluster is a MySQL high-availability solution that is open source. Percona Server for MySQL and Percona XtraBackup is integrated with the Galera library to provide synchronous multi-source replication.
How do I know if I have Percona MySQL?
If you notice XTRADB terms like XTRADB_READ_VIEW/XTRADB_INTERNAL_HASH_ TABLES/XTRADB_RSEG, you know it’s Percona Server for MySQL since they include XTRADB. That will not be included in Oracle Community.
What is Percona XtraBackup?
Percona XtraBackup is an open-source hot backup software for MySQL-based servers that does not lock your database while it is being backed up.
On MySQL 5.1, 5.5, and 5.6 servers, as well as Percona Server with XtraDB, it can back up data from InnoDB, XtraDB, and MyISAM tables.
The Percona MySQL integration process proves vital for users who want to migrate data from MySQL to Percona due to reasons varying from cost and robustness to scalability and deployability.
Nevertheless, managing MySQL databases, at times, can be complex — just like the Percona MySQL Integration process — and complicated for non-technical users.
Moreover, the data stored in these databases can act vital when knowing how your customers or B2B clients engage, buy, or build long-term relationships.
To become more efficient in managing your data integration with MySQL, any other databases, or a data warehouse of your choice, it is advisable to combine them with a solution that can perform Data Integration and Management procedures for you without much hassle.
This is where Hevo Data, a Cloud-based ETL Tool, comes in. Hevo can help you move data from multiple sources to your data warehouses in minutes without writing any code!
Want to take Hevo for a spin?
Sign Up for a 14-day free trial and experience the feature-rich Hevo suite firsthand.
You can also have a look at the unbeatable pricing that will help you choose the right plan for your business needs.
Now that you know about the installation of the Percona Server for MySQL you might also want to read about how to configure MySQL to connect to the SQL Server using multiple methods.
Also, don’t forget to write your views on the Percona MySQL Integration process in the comments section below.