Assumptions:
Percona Distribution for MySQL using Percona Server for MySQL 8.0
/var/lib/mysql is created as a distinct mount point sized to hold the expected aggregate size of the database files.
SELinux is enabled and enforcing.
You will use standard locations for files (/var/lib/mysql, /var/log/mysqld.log, /var/run/mysqld/mysqld.pid, /var/lib/mysql/mysql.sock, /var/lib/mysql-files). If you change any of these locations you should change the SELinux File Context appropriately.
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
sudo yum install percona-server-server
OEL8
OEL9
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.
Find out the initial password...
grep 'temporary password' /var/log/mysqld.log
Use it to login...
mysql -u root -p
Enter the password when promptedChange 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 8Whilst 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';