How to install MySQL 8.0 on CentOS 7

2023-09-28 17:56:35
Performance-Optimized Fast Internet Integrations - POFII

Introduction

MySQL is one of the most popular open-source relational database management systems. This guide will show you how to install MySQL 8.0 on a CentOS 7 system.

Prerequisites

Before starting the installation process, make sure that you have a CentOS 7 system with a non-root sudo enabled user and a basic firewall setup.

MySQL 8.0 Installation

1. Update Your System

First, update your system's package index:

$ sudo yum update -y

2. Add the MySQL Yum Repository

Next, download the MySQL Yum repository package from the MySQL official website:

$ wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm

Then install the downloaded release package with the following command:

$ sudo rpm -ivh mysql80-community-release-el7-3.noarch.rpm

3. Install MySQL Server

Now you can install MySQL server with the following command:

$ sudo yum install mysql-server -y

4. Start and Enable MySQL Service

Once the installation is complete, start the MySQL service and enable it to start on boot using the following commands:

$ sudo systemctl start mysqld
$ sudo systemctl enable mysqld

Conclusion

Congratulations, you have successfully installed MySQL 8.0 on your CentOS 7 system. Now you can start building your database applications with MySQL.

44

Was this answer helpful?