[root@OpenStack-node1 ~]# rpm -Uvh http://dev.mysql.com/get/MysqL-community-release-el7-5.noarch.rpm
Retrieving http://dev.MysqL.com/get/MysqL-community-release-el7-5.noarch.rpmPreparing... ################################# [100%]
Updating / installing...
1:MysqL-community-release-el7-5 ################################# [100%]
查看当前可用的MysqL安装资源:
[root@openstack-node1 ~]# yum repolist enabled | grep "MysqL.*-community.*"!MysqL-connectors-community/x86_64 MysqL Connectors Community 2
!MysqL-tools-community/x86_64 MysqL Tools Community 3
!MysqL56-community/x86_64 MysqL 5.6 Community Server 22
[root@openstack-node1 ~]# yum -y install MysqL-community-server
Loaded plugins: fastestmirror,langpacks
base | 3.6 kB 00:00
epel/x86_64/Metalink | 4.9 kB 00:00
extras | 3.4 kB 00:00
MysqL-connectors-community | 2.5 kB 00:00
MysqL-tools-community | 2.5 kB 00:00
MysqL56-community | 2.5 kB 00:00
updates | 3.4 kB 00:00
updates/7/x86_64/primary_db | 4.9 MB 00:05
……………………
Installing : MysqL-community-common-5.6.30-2.el7.x86_64 1/4
Installing : MysqL-community-libs-5.6.30-2.el7.x86_64 2/4
Installing : MysqL-community-client-5.6.30-2.el7.x86_64 3/4
Installing : MysqL-community-server-5.6.30-2.el7.x86_64 4/4
Verifying : MysqL-community-client-5.6.30-2.el7.x86_64 1/4
Verifying : MysqL-community-common-5.6.30-2.el7.x86_64 2/4
Verifying : MysqL-community-libs-5.6.30-2.el7.x86_64 3/4
Verifying : MysqL-community-server-5.6.30-2.el7.x86_64 4/4
Installed:
MysqL-community-server.x86_64 0:5.6.30-2.el7
Dependency Installed:
MysqL-community-client.x86_64 0:5.6.30-2.el7 MysqL-community-common.x86_64 0:5.6.30-2.el7 MysqL-community-libs.x86_64 0:5.6.30-2.el7
Complete!
@H_403_98@ #######安装成功后,将其加入开机启动
[root@typecodes ~]# systemctl enable MysqLd
启动MysqL服务进程
[root@typecodes ~]# systemctlstartMysqLd
配置(设置密码等) [root@typecodes ~]# MysqL_secure_installation
原文链接:https://www.f2er.com/bash/391393.html