当前位置:网站首页>Install mysql8 for Linux X ultra detailed graphic tutorial

Install mysql8 for Linux X ultra detailed graphic tutorial

2022-07-07 19:20:00 Poetic elegance

1、 download Mysql8.X Version installation package

1.1 You can download it directly with Baidu online disk

link :https://pan.baidu.com/s/1lc5ctVyp7kXXZXCsh9AiRA?pwd=yyds
Extraction code :yyds

1.2 Download from the official website

The website links
The specific download steps can be seen in another article I wrote separately mysql Download blog Jump Links

2、 Download good mysql Install package upload linux

 Insert picture description here
 Insert picture description here

3、Linux Installation procedure on

  • install Mysql rely on 【perl net-tools】
yum install perl net-tools -y

 Insert picture description here

  • uninstall mariadb
rpm -qa | grep mariadb
rpm -e --nodeps mariadb-libs-5.5.60-1.el7_5.x86_64

 Insert picture description here

  • install mysql
  • decompression mysql
tar -xvf mysql-8.0.18-1.el7.x86_64.rpm-bundle.tar

 Insert picture description here

  • Install the required installation package ( Four packages after decompression )
    Install step by step , You can't take a random step , Otherwise, unload the corresponding slave
rpm -ivh mysql-community-common-8.0.18-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-8.0.18-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-8.0.18-1.el7.x86_64.rpm
rpm -ivh mysql-community-server-8.0.18-1.el7.x86_64.rpm

 Insert picture description here

4、 Change custom password

  • start-up mysql
systemctl start mysqld
  • Find the password and log in Mysql
cat /var/log/mysqld.log | grep password

 Insert picture description here

mysql -u root -p

Enter the newly generated mysql Random cipher

  • modify Mysql password 8.0 Version input command
set global validate_password.policy=LOW; 
set global validate_password.length=6;
  • Change encryption 、
ALTER USER 'root'@'localhost' IDENTIFIED BY '123456' PASSWORD EXPIRE NEVER;
  • Update user password
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';
  • Refresh the permissions
FLUSH PRIVILEGES;

5、 Modify the remote connection

use mysql; 
update user set host='%' where user = 'root'; 
commit; 
exit;
  • restart mysq
systemctl restart mysqld;
  • Local navicat Connect remote mysql The server
     Insert picture description here
     Insert picture description here
原网站

版权声明
本文为[Poetic elegance]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207071515007391.html