[email protected]

learn – code – share

How to install Mysql secure server on Centos 7

Dec
07

Download mysql rpm from mysql website.

https://dev.mysql.com/downloads/repo/yum/

wget https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm

and compare the md5 sum

md5sum mysql57-community-release-el7-9.noarch.rpm
Output
1a29601dc380ef2c7bc25e2a0e25d31e  mysql57-community-release-el7-9.noarch.rpm

which should match the rpm you downloaded from mysql website.

Now install the package

sudo rpm -ivh mysql57-community-release-el7-9.noarch.rpm
sudo yum install mysql-server

once all installed restart the mysql server

sudo systemctl start mysqld

check mysql status

sudo systemctl status mysqld

if it is active and running then all good.

get the temporary password created which mysql installed using.

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

copy the password and put a side to use in next package installation.

Now its time to install mysql secure server.

sudo mysql_secure_installation

this will ask you root password, enter the temporary password we copied before and press enter

read all the statements and proceed installation and set the new password for mysql, once all done connect to mysql

mysql -u root -p

and enter the new we set in the mysql secure installation.

any issues comment below…

 

Leave a Reply

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