Install MySQL on CentOS 8 Server


This tutorial provides step-by-step instructions for installing MySQL database server on CentOS 8.

Install MySQL

Login to the server as root user

To install the database software, run the following command:

sudo dnf install mysql-server

Start MySQL Server

To start the MySQL server, run the following command:

sudo systemctl start mysqld

Secure the MySQL

To secure the MySQL installation, you should remove the anonymous user created during installation. To do so, run the following command:

sudo mysql_secure_installation

Ensure MySQL Starts on Boot

To ensure that your MySQL database automatically starts when the server is rebooted, run the following command:

sudo systemctl enable mysqld

Now you have successfully installed MySQL, started the MySQL server, removed anonymous user, and set the MySQL server to start automatically at reboot.

  • centos 8, mysql, centos
  • 0 Kasutajad peavad seda kasulikuks
Kas see vastus oli kasulik?

Related Articles

Manually Create config.inc.php for phpMyAdmin

This article discusses the manual creation of config.inc.php for phpMyAdmin installation....

Install MySQL on CentOS 7 Server

This tutorial provides step-by-step instructions for installing MySQL database server on CentOS...

Install MySQL on CentOS 6 Server

This tutorial provides step-by-step instructions for installing MySQL database server on CentOS...

MySQL Server GPG Keys Expired (Workaround)

This article provides a guide for resolving an issue caused by MySQL GPG key expiration. This...

Remove STRICT_TRANS_TABLES in SQL Mode for WHMCS

WHMCS, a billing and support software for the web hosts, may experience a conflict with default...