Skip to content

Instantly share code, notes, and snippets.

Created March 1, 2022 12:33
What would you like to do?
Install MySQL YUM repo on OL7 and OL8
RPM packages:
sudo yum install mysql80-community-release-el8-3.noarch.rpm
sudo yum install mysql80-community-release-el7-5.noarch.rpm
Rest is (or should) the same:
ls -l /etc/yum.repos.d/
(OL8 have a default mysql80 repo, part of ol8_appstream)
yum repolist all | grep mysql
ON OL8 you must disable the default ol8 mysql repo:
sudo yum module disable mysql
sudo yum install mysql-server
sudo systemctl start mysqld
sudo grep 'password' /var/log/mysqld.log
mysql -uroot -p
ALTER USER 'root'@'localhost' IDENTIFIED BY 'some-secure-password';
Things that are different:
- Without installing our MySQL yum rpm packages:
- in OL7 by running "sudo yum install mysql" you get mariadb installed
- in OL8 by running "sudo yum install mysql" you get mysql (version GA-2) + some mariadb packages installed.
MySQL 8.0.26 (is installed today and it's setup with insecure option, no root password by default)
OL8 also includes /etc/yum.repos.d/mysql-ol8.repo by default
- Using our yum packages:
- in OL7 we replace all MariaDB packages and MySQL is setup in a secure manner
- in OL8 you must disable the default "ol8 mysql" module from ol8_appstream, after this everything is the same as for OL7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment