Installing MySQL 8 on Oracle Linux 8 - nsojunior/mysql-general GitHub Wiki
Hello!
This is quick doc on the steps to install MySQL on Oracle Linux 8.
Official documentation is available at: https://dev.mysql.com/doc/mysql-installation-excerpt/8.0/en/
To install using Yum repository we can follow: https://dev.mysql.com/doc/mysql-installation-excerpt/8.0/en/linux-installation-yum-repo.html
Below quick step by step:
- Go to web page https://dev.mysql.com/downloads/repo/yum/ and download to the version you want to install or just copy the link to the RPM file
- Run the following command to install the Yum repository: sudo
sudo yum -y install [rpm file url]
, for me it issudo yum -y install https://dev.mysql.com/get/mysql80-community-release-el8-4.noarch.rpm
- For MySQL 8 installation on Oracle Linux 8, we must disable the default MySQL Module with the command:
sudo yum -y module disable mysql
- Now let's install MySQL 8 running the command
sudo yum -y install mysql-community-server
- Start mysql running the command
sudo systemctl start mysqld
- Check mysql process status:
systemctl status mysqld
- Get temporary root password in mysql log file:
sudo grep 'temporary password' /var/log/mysqld.log
- Log in MySQL using the command
mysql -uroot -p
and provide the temporary password - Change root user password running this SQL command in mysql client
ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!';
You are done!