当前位置:网站首页>Linux 安装mysql8.X超详细图文教程
Linux 安装mysql8.X超详细图文教程
2022-07-07 15:38:00 【诗风雅韵】
1、下载Mysql8.X版本安装包
1.1 可直接用百度网盘下载好的
链接:https://pan.baidu.com/s/1lc5ctVyp7kXXZXCsh9AiRA?pwd=yyds
提取码:yyds
1.2 官网下载
官网链接
具体下载步骤可见我另一篇单独写的下载mysql下载博客 跳转链接
2、下载好的mysql安装包上传linux


3、Linux上的安装步骤
- 安装Mysql依赖【perl net-tools】
yum install perl net-tools -y

- 卸载mariadb
rpm -qa | grep mariadb
rpm -e --nodeps mariadb-libs-5.5.60-1.el7_5.x86_64

- 安装mysql
- 解压mysql
tar -xvf mysql-8.0.18-1.el7.x86_64.rpm-bundle.tar

- 安装所需的安装包(解压之后的其中四个包)
安装步骤一步一步来,乱一步都不可以,否则卸载相应从装
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

4、修改自定义密码
- 启动mysql
systemctl start mysqld
- 查找密码并登陆Mysql
cat /var/log/mysqld.log | grep password

mysql -u root -p
输入刚生成的mysql随机密码
- 修改Mysql密码 8.0版本输入命令
set global validate_password.policy=LOW;
set global validate_password.length=6;
- 更改加密方式、
ALTER USER 'root'@'localhost' IDENTIFIED BY '123456' PASSWORD EXPIRE NEVER;
- 更新用户密码
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';
- 刷新权限
FLUSH PRIVILEGES;
5、修改可远程连接
use mysql;
update user set host='%' where user = 'root';
commit;
exit;
- 重启mysq
systemctl restart mysqld;
- 本地navicat连接远程mysql服务器


边栏推荐
- Pycharm IDE下载
- 99% of users often make mistakes in power Bi cloud reports
- LeetCode 1986. The minimum working time to complete the task is one question per day
- Seaborn data visualization
- LeetCode 1049. 最后一块石头的重量 II 每日一题
- 智慧物流平台:让海外仓更聪明
- LeetCode 213. 打家劫舍 II 每日一题
- Flash build API service
- LeetCode-SQL第一天
- DNS 系列(一):为什么更新了 DNS 记录不生效?
猜你喜欢

科普达人丨一文弄懂什么是云计算?

QT picture background color pixel processing method

SlashData开发者工具榜首等你而定!!!
![[video / audio data processing] Shanghai daoning brings you elecard download, trial and tutorial](/img/14/4e7ebfb1ed5b99f8377af9d17d2177.jpg)
[video / audio data processing] Shanghai daoning brings you elecard download, trial and tutorial

A tour of gRPC:03 - proto序列化/反序列化

Shallow understanding Net core routing

skimage学习(3)——Gamma 和 log对比度调整、直方图均衡、为灰度图像着色

QT中自定义控件的创建到封装到工具栏过程(一):自定义控件的创建

Nerf: the ultimate replacement for deepfake?

Module VI
随机推荐
LeetCode 152. Product maximum subarray daily question
Smart logistics platform: make overseas warehouses smarter
LeetCode 120. Triangle minimum path and daily question
[image sensor] correlated double sampling CDs
【视频/音频数据处理】上海道宁为您带来Elecard下载、试用、教程
【饭谈】Web3.0到来后,测试人员该何去何从?(十条预言和建议)
LeetCode 1477. Find two subarrays with sum as the target value and no overlap
Is AI more fair than people in the distribution of wealth? Research on multiplayer game from deepmind
第九届 蓝桥杯 决赛 交换次数
MySQL implements the query of merging two fields into one field
LeetCode 1477. 找两个和为目标值且不重叠的子数组 每日一题
Temperature sensor chip used in temperature detector
Process from creation to encapsulation of custom controls in QT to toolbar (I): creation of custom controls
The computer cannot add a domain, and the Ping domain name is displayed as the public IP. What is the problem? How to solve it?
Lowcode: four ways to help transportation companies enhance supply chain management
Matplotlib绘图界面设置
How to choose the appropriate automated testing tools?
Module VI
The server is completely broken and cannot be repaired. How to use backup to restore it into a virtual machine without damage?
Flash build API Service - generate API documents