当前位置:网站首页>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服务器
边栏推荐
- 防火墙系统崩溃、文件丢失的修复方法,材料成本0元
- [image sensor] correlated double sampling CDs
- Sator推出Web3游戏“Satorspace” ,并上线Huobi
- 蓝桥杯 决赛 异或变换 100分
- 99% of users often make mistakes in power Bi cloud reports
- Jenkins发布uniapp开发的H5遇到的问题
- 国内首创!Todesk将RTC技术融入远程桌面,画质更清晰操作更流畅
- 电脑无法加域,ping域名显示为公网IP,这是什么问题?怎么解决?
- LeetCode 1049. Weight of the last stone II daily question
- LeetCode 403. 青蛙过河 每日一题
猜你喜欢
AI来搞财富分配比人更公平?来自DeepMind的多人博弈游戏研究
浅浅理解.net core的路由
Lowcode: four ways to help transportation companies enhance supply chain management
The process of creating custom controls in QT to encapsulating them into toolbars (II): encapsulating custom controls into toolbars
The latest interview experience of Android manufacturers in 2022, Android view+handler+binder
Reflections on "product managers must read: five classic innovative thinking models"
Is AI more fair than people in the distribution of wealth? Research on multiplayer game from deepmind
Test case management tool recommendation
A tour of grpc:03 - proto serialization / deserialization
Temperature sensor chip used in temperature detector
随机推荐
Pycharm IDE下载
Master this promotion path and share interview materials
Solidity 开发环境搭建
Flash build API service
QT 图片背景色像素处理法
LeetCode 1981. 最小化目标值与所选元素的差 每日一题
蓝桥杯 决赛 异或变换 100分
【Seaborn】组合图表、多子图的实现
[Seaborn] implementation of combined charts and multi subgraphs
《产品经理必读:五种经典的创新思维模型》的读后感
LeetCode-SQL第一天
LeetCode 312. Poke balloon daily
QML初学
The server is completely broken and cannot be repaired. How to use backup to restore it into a virtual machine without damage?
LeetCode 1654. The minimum number of jumps to get home one question per day
[fan Tan] those stories that seem to be thinking of the company but are actually very selfish (I: building wheels)
LeetCode 1654. 到家的最少跳跃次数 每日一题
Sator launched Web3 game "satorspace" and launched hoobi
LeetCode 1477. Find two subarrays with sum as the target value and no overlap
LeetCode 120. 三角形最小路径和 每日一题