CentOS 7.8安装mysql 5.7.30

本文详细介绍了如何在CentOS 7.8上安装MySQL 5.7.30,包括安装步骤、配置数据库、开启远程访问、设置防火墙端口及调整密码策略。通过执行特定命令,可以启用3306端口,修改root密码,并将密码策略降低为LOW,允许密码长度最小为6位。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一、安装mysql软件

下载并安装MySQL官方的 Yum Repository,Mysql版本5.7.30

wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm

下载后直接yum安装

yum -y install mysql57-community-release-el7-10.noarch.rpm

安装MySQL服务器

yum -y install mysql-community-server

 

[root@CentOS Linux]# yum -y install mysql-community-server
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.163.com
 * extras: mirrors.163.com
 * updates: mirrors.163.com
mysql-connectors-community                                                                                                                                            | 2.5 kB  00:00:00     
mysql-tools-community                                                                                                                                                 | 2.5 kB  00:00:00     
mysql57-community                                                                                                                                                     | 2.5 kB  00:00:00     
(1/3): mysql-connectors-community/x86_64/primary_db                                                                                                                   |  57 kB  00:00:00     
(2/3): mysql-tools-community/x86_64/primary_db                                                                                                                        |  72 kB  00:00:00     
(3/3): mysql57-community/x86_64/primary_db                                                                                                                            | 213 kB  00:00:00     
Resolving Dependencies
--> Running transaction check
---> Package mysql-community-server.x86_64 0:5.7.30-1.el7 will be installed
--> Processing Dependency: mysql-community-common(x86-64) = 5.7.30-1.el7 for package: mysql-community-server-5.7.30-1.el7.x86_64
--> Processing Dependency: mysql-community-client(x86-64) >= 5.7.9 for package: mysql-community-server-5.7.30-1.el7.x86_64
--> Running transaction check
---> Package mysql-community-client.x86_64 0:5.7.30-1.el7 will be installed
--> Processing Dependency: mysql-community-libs(x86-64) >= 5.7.9 for package: mysql-community-client-5.7.30-1.el7.x86_64
---> Package mysql-community-common.x86_64 0:5.7.30-1.el7 will be installed
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.65-1.el7 will be obsoleted
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-9.el7.x86_64
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-9.el7.x86_64
---> Package mysql-community-libs.x86_64 0:5.7.30-1.el7 will be obsoleting
--> Running transaction check
---> Package mysql-community-libs-compat.x86_64 0:5.7.30-1.el7 will be obsoleting
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================================================
 Package                                                  Arch                                Version                                   Repository                                      Size
==============
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值