Header Ads Widget

Ticker

6/recent/ticker-posts

How to Install MySQL 8.0 on CentOS 8 / RHEL 8 | vetechno

How to Install MySQL 8.0 on CentOS 8 / RHEL 8 | vetechno
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.

Prerequisites:-

* Need root user access.

* Internet

* CentOS 8 / REHL 8

Also read 

 
 
 

Install MySQL 8.0 on CentOS 8 / RHEL 8

The default Application Stream repository helps you to install the latest version of the MySQL 8.0 on CentOS 8 and RHEL 8 systems using the following yum command.

Step1. Install the required packages using the following command. 

@mysql is a module that will help you to download and install the MySQL server and its dependencies along with it.
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
Step3. Check MySQL service status using the following command.
vikash@vetechno:~$   sudo systemctl status mysqld.service

 Secure MySQL Installation

We have successfully installed the MYSQL on CentOs. Now you can connect the MySQL server without any password but we recommend to secure the MySQL installation. The MySQL packages provide mysql_secure_installation command to apply the security. Just run the below command on terminal:
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

Now connect to MySQL server via terminal.
vikash@vetechno:~$   mysql -u root -p 

Conclusion

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.

Also read 

 

You may Also like

Post a Comment

0 Comments