当前位置:网站首页>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服务器
边栏推荐
- Sator推出Web3游戏“Satorspace” ,并上线Huobi
- 第九届 蓝桥杯 决赛 交换次数
- Arduino 控制的双足机器人
- MRS离线数据分析:通过Flink作业处理OBS数据
- LeetCode 1696. 跳跃游戏 VI 每日一题
- Direct dry goods, 100% praise
- LeetCode 1654. The minimum number of jumps to get home one question per day
- On Apache Doris Fe processing query SQL source code analysis
- Smart logistics platform: make overseas warehouses smarter
- What is cloud computing?
猜你喜欢
随机推荐
【饭谈】如何设计好一款测试平台?
mysql使用笔记一
Module VI
Matplotlib绘图界面设置
LeetCode 1155. 掷骰子的N种方法 每日一题
Seaborn data visualization
LeetCode 1155. N ways to roll dice one question per day
LeetCode 403. Frog crossing the river daily
管理VDI的几个最佳实践
测试用例管理工具推荐
[Fantan] how to design a test platform?
Sator推出Web3游戏“Satorspace” ,并上线Huobi
[fan Tan] after the arrival of Web3.0, where should testers go? (ten predictions and suggestions)
Biped robot controlled by Arduino
Proxmox VE重装后,如何无损挂载原有的数据盘?
LeetCode 1031. Maximum sum of two non overlapping subarrays
Mrs offline data analysis: process OBS data through Flink job
mysql实现两个字段合并成一个字段查询
Localstorage and sessionstorage
LeetCode 1043. 分隔数组以得到最大和 每日一题