Click here for "Safe Air Conditioner Repair and Proper Freon Recovery".

CentOS 7.6 ; Installing MySQL

1.Download MySQL

So far, I've compiled the source and installed it, but I'm going to install mysql5.7 using mysql mysql mysql.
If you install CentOS7.6, mariaDB (a MySQL compatible DB) may be installed. If this remains, it will conflict with the MySQL you are about to install, so remove it first.

1.1 Delete mariaDB

Check if mariaDB exists.

Delete mariaDB

1.2 Adding and configuring the official MySQL repository

①To install MySQL 5.6 or later, first install the repository from the official MySQL website.
Download the package for RHEL7 series and install it directly.

②Verify that the repository has been added.

③As it is, MySQL 8.0 will be installed, so we will change the configuration so that 5.7 will be installed.
To change the settings, the yum-utils package for changing yum settings is required, so install it if it is not already installed.

Disable MySQL 8.0

Activate MySQL 5.7

2.Installing MySQL

2.1 Check the version of the package.

If the version is 5.7.xx, it's OK to install.

2.2 Install


Check the version once it is installed.

3.Mysql start/stop/autostart settings

Make sure it is set to auto-start.

If it is enabled, auto-start is set to ON.Check with chkconfig

4.Initialization of Mysql

4.1 Know the initial password for the root user

MySQL 5.7 sets a random string of characters as a password for the root user upon first startup. The initial password is printed out in the MySQL log file. The log file is /var/log/mysqld.log. If you open the log, you will find the password as follows

4.2 Set the password for the root user.

①Change the root password to something different in mysql_secure_installation

②From now on, you can login to MySQL with