Percona
MySQL Install

Assumptions:

percona-release

sudo yum install -y https://repo.percona.com/yum/percona-release-latest.noarch.rpm

OEL8

OEL9

sudo percona-release setup pdps8.0

On RHEL8 systems be sure to disable the dnf mysql module when prompted.(Disabling does this command under the covers: sudo dnf module disable mysql, check status with sudo dnf module list)

OEL8

OEL9

If your target server is isolated from the internet and you are hosting your own yum server... download the required rpms from Percona. Note that the Oracle MySQL rpm will clash with the Percona Server rpm; you may have to work around this by keeping the files in distinct repositories that can be enabled/disabled as necessary. You should skip the steps above but you will need to do this... sudo dnf module disable mysqlyum install compat-openssl10.
To populate your local yum repository you could use something like this...rm index.htmlwget http://repo.percona.com/pdps-8.0.28/yum/release/8.0/RPMS/x86_64/for i in `cat index.html | grep rpm| cut -f2 -d'"' | grep -v debuginfo | grep -v debugsource`do        rm -rf $i        wget http://repo.percona.com/pdps-8.0.28/yum/release/8.0/RPMS/x86_64/$idone 

Install

The installation creates /etc/logrotate.d/mysql, /etc/my.cnf and /etc/my.cnf.dIt creates several files in /usr/bin, a lot of files in /usr/lib (including /usr/lib/systemd/system/mysqld.service), and a lot of files in /usr/lib64/mysqlIt creates mysqld and mysqld-debug in /usr/sbin, and several files in /usr/share/doc, /usr/share/man and /usr/share/percona-serverIt also creates /var/lib/mysql, /var/lib/mysql-files, /var/lib/mysql-keyring and /var/run/mysqld
If you want to have /var/lib/mysql as a separate mount point (recommended) then you should do this before running the yum install.

sudo yum install percona-server-server

Earlier versions have a slightly different naming standard. E.g. for 5.7 you would use...sudo yum install Percona-Server-server-57

OEL8

OEL9

Update Configuration File

You can revisit this properly later but, if you have already created any files or subdirectories under /var/lib/mysql then, at a minimum, create a subdirectory called /var/lib/mysql/data and set the datadir configuration variable in /etc/my.cnf to point to it. MySQL will not start if the datadir is not empty.


As an example, at one company I worked for, we had separate mount points for MySQL Backups and Binary Logs that were created under /var/lib/mysql. It worked well to keep MySQL logically together whilst also keeping backups and binlogs physically separate... but it did stop MySQL from initialising the datadir on first startup, which meant MySQL would not successfully start until I had updated datadir.
As another example, a different database server I worked on had antivirus installed (Sentinel1) which created hidden files (.aaa, .bbb etc) in the top level directory of any mount point. As /var/lib/mysql was configured as a separate mount point these files existed at first startup of MySQL and, as stated above, MySQL will not start (or, more accurately, will not initialise the datadir) if the datadir is not empty.

Start MySQL

systemctl start mysql

Reset Password

Find out the initial password...

grep 'temporary password' /var/log/mysqld.log

Use it to login...

mysql -u root -p

Enter the password when prompted

Change the password (be sure to store it somewhere securely)...

ALTER USER 'root'@'localhost' IDENTIFIED BY RANDOM PASSWORD;

Note that 'BY RANDOM PASSWORD' functionality is not available in versions earlier than MySQL 8

User Defined Functions

Whilst still connected to MySQL as 'root'...

CREATE FUNCTION fnv1a_64 RETURNS INTEGER SONAME 'libfnv1a_udf.so';

CREATE FUNCTION fnv_64 RETURNS INTEGER SONAME 'libfnv_udf.so';

CREATE FUNCTION murmur_hash RETURNS INTEGER SONAME 'libmurmur_udf.so';

Next Steps

Bibliography