Installing  MySQL on linux

STEP -1

-Download the rpm required based on your operating system here iam using linux

-User the below link to assess the RPM

-Link-

https://dev.mysql.com/doc/refman/8.1/en/

Downloading RPM

-Click on MySQL server first

– Click on Installing and upgrading MySQL

-Select Installing MySQL on linux

-Select installing MySQL on linux using MySQL yum Repository

-Click on MySQL yum repository

STEP -2

 

-Check the current version of the linux and Download the correct RPM

– Here the version is 7.9 so I have downloaded the 7 version of rpm

 

– Based on your version you can download the RMP and move to the linux

STEP -3

 

– Using the wget method to download

– Here we have successfully downloaded the package it showing it have completed 100 percent

– Another method download it and move to the server

STEP -4

-Before creating the repository for mysql check the previously exists

– By using the command /etc/yum.repos.d

– By executing this command we can identify there is now existing repo

STEP -5

– Move to the home path and extract the rpm we have downloaded previously

– Here the rmp name is mysql80-community-release-el7-10.noarch.rpm

– By using the command

rmp -ivh <downloaded file>       —extract the rmp

STEP -6

 

– After installing the rmp now install the community server by using the command

yum install mysql-community-server -y

– User -Y to avoid conformation in between the installation

– After completion for this step the installation of MySQL server is almost done

Install mysql community server

-Here we have seen the completed status now will start the mysql server

STEP -7

-Start the service of mysql using

systemctl start mysqld

-Also some relevant commands

systemctl stop mysqld

systemctl restart mysqld

systemctl status mysqld

– Now start services

STEP -8

– After start the services check the mysqld.log or grep the password using the below command

– There will be a temporary password will be created

– For the first log in alone need to give the system genarated password after we will change

– With the system generated password connect to the database

– You can’t do any operation untill you have reset the password

Reset password

– The password must contain multiple character to match the criteria

– By using the command

alter user ‘root’@’localhost’ identified by ‘Mysql#95ns’;

– After this you can execute db commsnds

STEP-9

Completion

– After changing the password it’s possible to execute the database queries

Recent Posts

Start typing and press Enter to search