Created
March 1, 2022 12:33
-
-
Save wwwted/b0800f052b832ed759576d7548cdffb8 to your computer and use it in GitHub Desktop.
Install MySQL YUM repo on OL7 and OL8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Docs: https://dev.mysql.com/downloads/repo/yum/ | |
RPM packages: | |
OL8: https://dev.mysql.com/get/mysql80-community-release-el8-3.noarch.rpm | |
OL7: https://dev.mysql.com/get/mysql80-community-release-el7-5.noarch.rpm | |
OL8 | |
wget https://dev.mysql.com/get/mysql80-community-release-el8-3.noarch.rpm | |
sudo yum install mysql80-community-release-el8-3.noarch.rpm | |
OL7 | |
wget https://dev.mysql.com/get/mysql80-community-release-el7-5.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 | |
/* IMPORTANT */ | |
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