Last Updated on August 22, 2022 by Vikash Ekka
|How to Install MySQL 8.0 on CentOS 8 / RHEL 8 | vetechno|
Hey reader, In this tutorial we are going to install mysql 8.0.29, which is the latest version of mysql community.
MySQL is an open-source database management system and free to use. It is commonly installed as part of the most popular LAMP (Linux, Apache, MySQL, PHP/Python/Perl) stack and LEMP (Linux, Nginx, MySQL, PHP) stack.
It uses a relational database and SQL (Structured Query Language) to manage its data. It is the most common software stack that comes up with dynamic websites and web applications.
This tutorial will help you to install MySQL 8.0 on CentOS 8 and RHEL 8 systems.
* Need root user access.
* CentOS 8 / REHL 8
Install MySQL 8.0 on CentOS 8 / RHEL 8
Step1. Install the required packages using the following command.
vikash@vetechno:~$ sudo dnf -y install @mysql
Step2. Now we need to enable the MySQL service to auto-start on the system start.
vikash@vetechno:~$ sudo systemctl enable mysqld.service vikash@vetechno:~$ sudo systemctl start mysqld.service
vikash@vetechno:~$ sudo systemctl status mysqld.service
Secure MySQL Installation
vikash@vetechno:~$ sudo mysql_secure_installation
Follow the on screen and input below details.
# Press y|Y for Yes, any other key for No: y # Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 2 # New password: [ENTER STRONG PASSWORD HERE] # Re-enter new password: RE ENTER PASSWORD HERE # Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y # Remove anonymous users? (Press y|Y for Yes, any other key for No) : y # Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y # Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y # Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
Log into MySQL
vikash@vetechno:~$ mysql -u root -p
You have successfully installed and configured MySQL 8.0 on CentOS 8 system.
Let us know if you are facing any issue while installing in comment section, we will happy to help you.
You may Also like