This tutorial provides step-by-step instructions for installing MySQL database server on CentOS 7.
To install the database software, run the following command:
$ yum install mysql-server
Start MySQL Server
To start the MySQL server, run the following command:
$ 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:
Ensure MySQL Starts on Boot
To ensure that your MySQL database automatically starts when the server is rebooted, run the following command:
$ 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.