Install MySQL on Linux (detailed interpretation of graphics and text)

Install MySQL on Linux

 

table of Contents

Install MySQL on Linux

One: Preparation of installation tools

Two: Upload the installation package to the corresponding directory of the linux system [upload via WinScp]

Three: Uninstall MySQL that comes with the system

Four: Install the mysql server

Five: Install the mysql client to connect to the server 

Six: Windows side access to Linux side mysql

Seven: Summary


 

One: Preparation of installation tools

    1. MySQL-5.6.47-1.el7.x86_64.rpm-bundle.tar

Link: https://pan.baidu.com/s/1SGUwl87SQ6w253yLLJ5JNg 
Extraction code: aoye 

     2. WinSCP-5.17.5-Setup

Link: https://pan.baidu.com/s/137BmJIktaGzN0p4fylbUhQ 
Extraction code: aoye 

Two: Upload the installation package to the corresponding directory of the linux system [upload via WinScp]

Three: Uninstall MySQL that comes with the system

1. Enter to view the built-in mysql: rpm -qa | grep -i mysql

2. Uninstall the built-in mysql: rpm -e package package name--nodeps (nodeps is a mandatory deletion parameter) [package package name is the name of the built-in mysql searched, no need to uninstall it]

Four: Install the mysql server

1. Unzip the mysql installation package

2. Enter the mysql decompression directory

3. To install dependent libraries online, enter:

yum -y install libaio.so.1 libagcc_s.so.1 libstdcc++.so.6 libncurses.so.5 --setopt=protected_multilib=false  yum update libstdc++-4.4.7-4.el6.x86_64

4. Delete the mariadb installation package to prevent conflicts, check whether the package exists: rpm -qa | grep mariadb, and then delete it: rpm -e package name --nodeps

 

5. Install the server side: rpm -ivh MySQL-server-5.611.47-1.el7.x86_64.rpm

The following error occurred:

The solution is as follows:

Input:  yum -y install autoconf

Try to install again successfully:

6. View the random password:  cat /root/.mysql_secret

Five: Install the mysql client to connect to the server 

1. Install the client [Connect to the server]

rpm -ivh MySQL-client-5.6.47-1.el7.x86_64.rpm 

2. Verify that the mysql service status bin starts [After jdk 7, the mysql service starts and starts automatically by default ]

systemctl status mysql.service [inspection status]

systemctl status mysql.service [Open service]

systemctl status mysql.service [Close service]

8. Copy the random password to log in to mysql, and then modify the password [ set password for root@localhost=password('Set your own password')  ]

 

Six: Windows side access to Linux side mysql

1. First authorize remote access under linux

grant all privileges on *.* to'root' @'%' identified by'password'; [Remember this is entered after logging in to mysql]

2. Check the firewall status and turn off the firewall

systemctl status firewalld.service [View status]

systemctl start firewalld.service [Open firewall]

systemctl stop firewalld.service [Close the firewall]

3. Use sqlyog to connect to mysql on Linux

 

Seven: Summary

Follow-up will be issued to learn the basic operation of mysql.

Make a little progress every day.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Guess you like

Origin blog.csdn.net/m0_46440794/article/details/115296051