Installation of MySQL 8.0 on CentOS/RHEL 7.0

MySQL released it’s new version MySQL 8.0 under GNU. MySQL is an open-source Relational Database Management System(RDBMS). MySQL provide multiple database access on single server on each created database.

Changes in MySQL 8.0

  • Changes in Data Dictionary
  • Configuration Changes
  • Server changes
  • innoDB changes
  • SQL changes
  • Caching_sha2_password as the Preferred Authentication Plugin


If you are already installed MySQL then you have to upgrade or replace it Using MySQL  Yum repository. Before upgrading or replacing MySQL you must take backup of database. For fresh installation follow step –


Login SSH server as root user:

#ssh [email protected]_IP

login as : root

password : password


Step1. Install Yum repository of MySQL 8

# wget

Install downloaded packages

# yum localinstall mysql80-community-release-el7-1.noarch.rpm

Now you can verify downloaded packages using this command

# yum repolist enabled | grep "mysql"

Step2. Install MySQL 8.0

After added yum packages run following command to install MySQL 8.0

# yum install mysql-community-server

Step3. Start the services of MySQL

# systemctl start mysqld

# systemctl status mysqld 

# mysql --version

Step4 – setup secure server

In the latest version of MySQL  8.0 has feature to create temporary  password in to a file /var/log/mysqld.log. we can grep this password using this command-

# grep 'temporary password' /var/log/mysqld.log


You have random password of MySQL database. Now you can start secure installation of MySQL database and reset you password and you can remove anonymous users. use following command-



Step5. Connect with MySQL server

# mysql -u root -p


Leave a Reply

Your email address will not be published. Required fields are marked *