当前位置:网站首页>MySQL8 download, start, configure, verify
MySQL8 download, start, configure, verify
2022-08-02 02:05:00 【dreambyday】
一、下载MySQL 8.0
cd /usr/local
mkdir mysql
cd mysql
wget https://repo.mysql.com//mysql80-community-release-el7-1.noarch.rpm
二、 安装
rpm -ivh mysql80-community-release-el7-1.noarch.rpm
yum clean all
yum makecache
sudo yum install mysql-server --nogpgcheck
三、启动、配置
3.1. 启动
systemctl start mysqld.service
3.2. 配置
3.2.1. 设置开机启动
systemctl enable mysqld.service
3.2.2 查看初始密码
cat /var/log/mysqld.log | grep password
可以看到密码是 tgji-Za4l2ON
3.2.3. 连接数据库、输入密码
回车后输入密码
mysql -u root -p
3.2.4. 修改密码
Mysql Do not operate without changing the password.The set password requires uppercase and lowercase numbers and special characters,达到8位以上.Set this first and then change the password rules.
alter user 'root'@'localhost' IDENTIFIED BY '[email protected]';
3.2.5. 设置密码的规则
Change the password level to low,And the minimum length is 6.Then you can reset it to the desired password
set global validate_password.policy=LOW;
set global validate_password.length=6;
View password setting rules
SHOW VARIABLES LIKE 'validate_password%;
±-------------------------------------±-------+
| Variable_name | Value |
±-------------------------------------±-------+
| validate_password.check_user_name | ON |
| validate_password.dictionary_file | |
| validate_password.length | 8 |
| validate_password.mixed_case_count | 1 |
| validate_password.number_count | 1 |
| validate_password.policy | MEDIUM |
| validate_password.special_char_count | 1 |
±-------------------------------------±-------+
————————————————
关于 mysql 密码策略相关参数;
1)validate_password_length 固定密码的总长度;
2)validate_password_dictionary_file 指定密码验证的文件路径;
3)validate_password_mixed_case_count 整个密码中至少要包含大/小写字母的总个数;
4)validate_password_number_count 整个密码中至少要包含阿拉伯数字的个数;
5)validate_password_special_char_count 整个密码中至少要包含特殊字符的个数;
6)validate_password_policy 指定密码的强度验证等级,默认为 MEDIUM;
- LOW:只验证长度;
- MEDIUM:验证长度、数字、大小写、特殊字符;
- STRONG:验证长度、数字、大小写、特殊字符、字典文件;
3.2.5 remove accessIP限制
use mysql;
update user set host='%' where user = 'root';
flush privileges;
3.2.6 关闭防火墙
service firewalld stop
四、navicat连接测试
边栏推荐
- MySQL优化策略
- Ask God to answer, how should this kind of sql be written?
- 6-25 Vulnerability Exploitation - irc Backdoor Exploitation
- 第一次写对牛客的编程面试题:输入一个字符串,返回该字符串出现最多的字母
- LeetCode刷题日记:74. 搜索二维矩阵
- Image fusion based on weighted 】 and pyramid image fusion with matlab code
- Some insights from 5 years of automated testing experience: UI automation must overcome these 10 pits
- 用位运算为你的程序加速
- Golang分布式应用之Redis
- Multi-Party Threshold Private Set Intersection with Sublinear Communication-2021:解读
猜你喜欢
Constructor instance method inheritance of typescript37-class (extends)
哈希冲突和一致性哈希
力扣 1374. 生成每种字符都是奇数个的字符串
『网易实习』周记(一)
Handwriting a blogging platform ~ Day 3
LeetCode刷题日记:LCP 03.机器人大冒险
typescript38-class的构造函数实例方法继承(implement)
[LeetCode Daily Question]——654. The largest binary tree
Understand the big model in seconds | 3 steps to get AI to write a summary
Constructor of typescript35-class
随机推荐
Data transfer at the data link layer
LeetCode brushing diary: 53, the largest sub-array and
C语言之插入字符简单练习
《自然语言处理实战入门》 基于知识图谱的问答机器人
求大神解答,这种 sql 应该怎么写?
雇用WordPress开发人员:4个实用的方法
AOF重写
『网易实习』周记(一)
A full set of common interview questions for software testing functional testing [open thinking questions] interview summary 4-3
Entry name ‘org/apache/commons/codec/language/bm/gen_approx_greeklatin.txt’ collided
秒懂大模型 | 3步搞定AI写摘要
LeetCode刷题日记: 33、搜索旋转排序数组
超大规模的产业实用语义分割数据集PSSL与预训练模型开源啦!
『网易实习』周记(二)
LeetCode 213. Robbery II (2022.08.01)
swift项目,sqlcipher3 -> 4,无法打开旧版数据库有办法解决吗
Constructor instance method inheritance of typescript38-class (implement)
第一次写对牛客的编程面试题:输入一个字符串,返回该字符串出现最多的字母
记录一次数组转集合出现错误的坑点,尽量使用包装类型数组进行转换
Ask God to answer, how should this kind of sql be written?