Saturday, February 6, 2021

My way to Install MySQL 5.7 on CentOS/RHEL 7/6 | Easy way to Install Mysql 5.7 on Centos 7

 

Step 1 – You have to enable MySQL Repository



-- To enable on CentOS and RHEL 7 -- 


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


-- To enable on CentOS and RHEL 6 -- 


# yum localinstall https://dev.mysql.com/get/mysql57-community-release-el6-9.noarch.rpm



Step 2 – You have to Install MySQL 5.7 Server 

Use below command to install mysql server and all it's dependency 

# yum install mysql-community-server



After installing MySQL 5.7 Server default root password will be set to see detault pass you have to run below command .


# grep 'A temporary password' /var/log/mysqld.log |tail -1



Default password  you will get is Nm(!pKkkjo68e


Step 3- You have to  Start MySQL Service

To start mysql service you can use below command 

# systemctl status mysqld 

# systemctl start mysqld 
or 

# systemctl restart mysqld 


Step 4- You have to Enable MySQL Service


This command will make entry to enable mysql service on boot 


#systemctl enable mysqld 

Step 5- You have to do Initial MySQL Configuration


# /usr/bin/mysql_secure_installation


Step  6– Now you can Login to MySQL

# mysql -h localhost -u root -p 



Step 7 – Check MySQL Version


# mysql -V




For Mysql Management Click Here



Enjoy 

No comments:

Post a Comment

Installing Jenkins on RHEL 8 is a straightforward process. Here's a step-by-step guide

Introduction  Jenkins is an open-source automation server widely used for continuous integration (CI) and continuous delivery (CD) pipelines...