当前位置:网站首页>linux(centOs7)部署mysql(8.0.20)数据库
linux(centOs7)部署mysql(8.0.20)数据库
2022-08-05 00:48:00 【一只代码小白啦啦啦】
linux(centOs7)部署mysql(8.0.20)数据库,在腾讯云上面已经部署成功
环境配置:
腾讯轻量应用服务器,使用的是centos
下载链接
wget https://cdn.mysql.com/archives/mysql-8.0/mysql-8.0.20-1.el7.x86_64.rpm-bundle.tar
先在local创建mysql文件夹
cd /usr/local
mkdir mysql
解压
tar -xvf mysql-8.0.20-1.el7.x86_64.rpm-bundle.tar -C /usr/local/mysql
如果报错:
warning: mysql-community-libs-8.0.20-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
error: Failed dependencies:
mariadb-libs is obsoleted by mysql-community-libs-8.0.20-1.el7.x86_64
解决方法:
#先卸载mysql-libs
yum remove mysql-libs
解压好文件按以下顺序安装
rpm -ivh mysql-community-common-8.0.20-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-8.0.20-1.el7.x86_64.rpm
rpm -ivh mysql-community-devel-8.0.20-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-compat-8.0.20-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-8.0.20-1.el7.x86_64.rpm
yum install net-tools
rpm -ivh mysql-community-server-8.0.20-1.el7.x86_64.rpm
查看mysql状态systemctl status mysqld
启动mysql systemctl start mysqld
开机自启 systemctl enable mysqld
查看已经启动的服务(yum install net-tools)
netstat -tunlp
netstat -tunlp|grep mysql
查看mysql进程 ps -ef|grep mysql
Rpm安装固定路径
查阅数据库的临时密码
查看内容 cat /var/log/mysqld.log
查看临时密码 cat /var/log/mysqld.log|grep password
使用临时密码登录
mysql -uroot -p
设置密码最短长度
set global validate_password.length=4;
set global validate_password.policy=0;
这两种都可以试一下,忘记那个可以了
ALTER USER ‘root’@‘localhost’ IDENTIFIED BY 密码(要引号);
查看密码长度和验证策略
SHOW VARIABLES LIKE ‘validate_password%’;
设置mysql远程访问
use mysql
update user set host = ‘%’ where user = ‘root’;
flush privileges;
select user,host from user’;
边栏推荐
- 软件测试面试题:LoadRunner 分为哪三个模块?
- Software testing interview questions: the difference and connection between black box testing, white box testing, and unit testing, integration testing, system testing, and acceptance testing?
- B站7月榜单丨飞瓜数据B站UP主排行榜发布!
- Lattice PCIe Learning 1
- GCC: compile-time library path and runtime library path
- 2021年11月网络规划设计师上午题知识点(上)
- ORA-00604 ORA-02429
- 配置类总结
- 软件基础的理论
- GCC: paths to header and library files
猜你喜欢

TinyMCE disable escape

5. PCIe official example

Activity Recommendation | Kuaishou StreamLake Brand Launch Conference, witness together on August 10!

JVM类加载简介

oracle create tablespace

深度学习:使用nanodet训练自己制作的数据集并测试模型,通俗易懂,适合小白

阶段性测试完成后,你进行缺陷分析了么?

"WEB Security Penetration Testing" (28) Burp Collaborator-dnslog out-band technology

OPENWIFI实践1:下载并编译SDRPi的HDL源码

CNI(Container Network Plugin)
随机推荐
码率vs.分辨率,哪一个更重要?
软件测试面试题:LoadRunner 分为哪三个模块?
软件测试面试题:测试用例通常包括那些内容?
Redis visual management software Redis Desktop Manager2022
2022多校第二场 K题 Link with Bracket Sequence I
5.PCIe官方示例
Software Testing Interview Questions: Qualifying Criteria for Software Acceptance Testing?
oracle create user
SV class virtual method of polymorphism
The method of freely controlling concurrency in the sync package in GO
Will domestic websites use Hong Kong servers be blocked?
软件测试面试题:系统测试的策略有?
自定义线程池
ora-01105 ora-03175
CNI (Container Network Plugin)
Software testing interview questions: What are the three modules of LoadRunner?
2022 Nioke Multi-School Training Session 2 J Question Link with Arithmetic Progression
FSAWS 的全球基础设施和网络
QSunSync Qiniu cloud file synchronization tool, batch upload
PCIe Core Configuration