How to install MySQL 5.7 on CentOS 7 Server

To install MySQL 5.7 on CentOS 7 server, install the repository

rpm -ivh

import MySQL GPG key with

rpm --import

Install MySQL with the command

yum install mysql-community-server.x86_64

Enable MySQL to start on boot

systemctl enable mysqld

Start MySQL with

systemctl start mysqld

Find the initial MySQL password with the command

grep 'password' /var/log/mysqld.log

This initial password is expired, you should change this password before you can start using MySQL server.

To set MySQL password and secure MySQL server, run the command

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *