Installing MySQL 8 on Oracle Linux 8 - nsojunior/mysql-general Wiki


This is quick doc on the steps to install MySQL on Oracle Linux 8.

Official documentation is available at:

To install using Yum repository we can follow:

Below quick step by step:

  1. Go to web page and download to the version you want to install or just copy the link to the RPM file
  2. Run the following command to install the Yum repository: sudo sudo yum -y install [rpm file url], for me it is sudo yum -y install
  3. For MySQL 8 installation on Oracle Linux 8, we must disable the default MySQL Module with the command: sudo yum -y module disable mysql
  4. Now let's install MySQL 8 running the command sudo yum -y install mysql-community-server
  5. Start mysql running the command sudo systemctl start mysqld
  6. Check mysql process status: systemctl status mysqld
  7. Get temporary root password in mysql log file: sudo grep 'temporary password' /var/log/mysqld.log
  8. Log in MySQL using the command mysql -uroot -p and provide the temporary password
  9. Change root user password running this SQL command in mysql client ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!';

You are done!