文章详情

短信预约-IT技能 免费直播动态提醒

请输入下面的图形验证码

提交验证

短信预约提醒成功

centos7安装mysql5.7实例分析

2023-06-30 11:28

关注

这篇“centos7安装mysql5.7实例分析”文章的知识点大部分人都不太理解,所以小编给大家总结了以下内容,内容详细,步骤清晰,具有一定的借鉴价值,希望大家阅读完这篇文章能有所收获,下面我们一起来看看这篇“centos7安装mysql5.7实例分析”文章吧。

下载安装mysql

下载rpm安装包

wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm--2022-01-22 03:01:53--  http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpmResolving dev.mysql.com (dev.mysql.com)... 137.254.60.11Connecting to dev.mysql.com (dev.mysql.com)|137.254.60.11|:80... connected.HTTP request sent, awaiting response... 301 Moved PermanentlyLocation: https://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm [following]--2022-01-22 03:01:54--  https://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpmConnecting to dev.mysql.com (dev.mysql.com)|137.254.60.11|:443... connected.HTTP request sent, awaiting response... 302 FoundLocation: https://repo.mysql.com//mysql57-community-release-el7-8.noarch.rpm [following]--2022-01-22 03:01:55--  https://repo.mysql.com//mysql57-community-release-el7-8.noarch.rpmResolving repo.mysql.com (repo.mysql.com)... 23.36.253.13Connecting to repo.mysql.com (repo.mysql.com)|23.36.253.13|:443... connected.HTTP request sent, awaiting response... 200 OKLength: 9116 (8.9K) [application/x-redhat-package-manager]Saving to: ‘mysql57-community-release-el7-8.noarch.rpm' 100%[=========================================================================================================================================================================>] 9,116       --.-K/s   in 0s       2022-01-22 03:01:55 (249 MB/s) - ‘mysql57-community-release-el7-8.noarch.rpm' saved [9116/9116]

安装

yum localinstall mysql57-community-release-el7-8.noarch.rpm
(py3) [root@localhost opt]# yum localinstall mysql57-community-release-el7-8.noarch.rpmLoaded plugins: fastestmirror, langpacksExamining mysql57-community-release-el7-8.noarch.rpm: mysql57-community-release-el7-8.noarchMarking mysql57-community-release-el7-8.noarch.rpm to be installedResolving Dependencies--> Running transaction check---> Package mysql57-community-release.noarch 0:el7-8 will be installed--> Finished Dependency Resolution Dependencies Resolved =================================================================================================================================================================================================================== Package                                                  Arch                                  Version                               Repository                                                              Size===================================================================================================================================================================================================================Installing: mysql57-community-release                                noarch                                el7-8                                 /mysql57-community-release-el7-8.noarch                                8.2 k Transaction Summary===================================================================================================================================================================================================================Install  1 Package Total size: 8.2 kInstalled size: 8.2 kIs this ok [y/d/N]: yDownloading packages:Running transaction checkRunning transaction testTransaction test succeededRunning transaction  Installing : mysql57-community-release-el7-8.noarch                                                                                                                                                          1/1   Verifying  : mysql57-community-release-el7-8.noarch                                                                                                                                                          1/1  Installed:  mysql57-community-release.noarch 0:el7-8                                                                                                                                                                          Complete!

查看安装情况

(py3) [root@localhost opt]# yum repolist enabled | grep "mysql.*-community.*"mysql-connectors-community/x86_64       MySQL Connectors Community           167mysql-tools-community/x86_64            MySQL Tools Community                 82mysql57-community/x86_64                MySQL 5.7 Community Server           564

安装server

yum -y install mysql-community-server
(py3) [root@localhost opt]# yum -y install mysql-community-serverLoaded plugins: fastestmirror, langpacksLoading mirror speeds from cached hostfile * base: mirrors.tuna.tsinghua.edu.cn * extras: mirrors.tuna.tsinghua.edu.cn * updates: mirrors.tuna.tsinghua.edu.cnResolving Dependencies--> Running transaction check---> Package mysql-community-server.x86_64 0:5.7.37-1.el7 will be installed--> Processing Dependency: mysql-community-common(x86-64) = 5.7.37-1.el7 for package: mysql-community-server-5.7.37-1.el7.x86_64--> Processing Dependency: mysql-community-client(x86-64) >= 5.7.9 for package: mysql-community-server-5.7.37-1.el7.x86_64--> Running transaction check---> Package mysql-community-client.x86_64 0:5.7.37-1.el7 will be installed--> Processing Dependency: mysql-community-libs(x86-64) >= 5.7.9 for package: mysql-community-client-5.7.37-1.el7.x86_64---> Package mysql-community-common.x86_64 0:5.7.37-1.el7 will be installed--> Running transaction check---> Package mysql-community-libs.x86_64 0:5.7.37-1.el7 will be installed--> Finished Dependency Resolution Dependencies Resolved =================================================================================================================================================================================================================== Package                                                   Arch                                      Version                                            Repository                                            Size===================================================================================================================================================================================================================Installing: mysql-community-server                                    x86_64                                    5.7.37-1.el7                                       mysql57-community                                    174 MInstalling for dependencies: mysql-community-client                                    x86_64                                    5.7.37-1.el7                                       mysql57-community                                     25 M mysql-community-common                                    x86_64                                    5.7.37-1.el7                                       mysql57-community                                    311 k mysql-community-libs                                      x86_64                                    5.7.37-1.el7                                       mysql57-community                                    2.4 M Transaction Summary===================================================================================================================================================================================================================Install  1 Package (+3 Dependent packages) Total download size: 202 MInstalled size: 878 MDownloading packages:warning: /var/cache/yum/x86_64/7/mysql57-community/packages/mysql-community-common-5.7.37-1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY               ]  0.0 B/s | 767 kB  --:--:-- ETA Public key for mysql-community-common-5.7.37-1.el7.x86_64.rpm is not installed(1/4): mysql-community-common-5.7.37-1.el7.x86_64.rpm                                                                                                                                       | 311 kB  00:00:00     (2/4): mysql-community-libs-5.7.37-1.el7.x86_64.rpm                                                                                                                                         | 2.4 MB  00:00:04     (3/4): mysql-community-client-5.7.37-1.el7.x86_64.rpm                                                                                                                                       |  25 MB  00:01:01     (4/4): mysql-community-server-5.7.37-1.el7.x86_64.rpm                                                                                                                                       | 174 MB  00:03:40     -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Total                                                                                                                                                                              917 kB/s | 202 MB  00:03:45     Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysqlImporting GPG key 0x5072E1F5: Userid     : "MySQL Release Engineering <mysql-build@oss.oracle.com>" Fingerprint: a4a9 4068 76fc bd3c 4567 70c8 8c71 8d3b 5072 e1f5 Package    : mysql57-community-release-el7-8.noarch (@/mysql57-community-release-el7-8.noarch) From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql  Public key for mysql-community-server-5.7.37-1.el7.x86_64.rpm is not installed   Failing package is: mysql-community-server-5.7.37-1.el7.x86_64 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

这里发现这个问题:

Public key for mysql-community-server-5.7.37-1.el7.x86_64.rpm is not installed  Failing package is: mysql-community-server-5.7.37-1.el7.x86_64 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

备注:

由于MySQL在CentOS7中收费了,所以已经不支持MySQL了,取而代之在CentOS7内部集成了mariadb,而安装MySQL的话会和MariaDB的文件冲突。

如果安装的话,需要卸载MariaDB,另外也注意安装正确的安装包,以及安装顺序。

以上就是关于“centos7安装mysql5.7实例分析”这篇文章的内容,相信大家都有了一定的了解,希望小编分享的内容对大家有帮助,若想了解更多相关的知识内容,请关注编程网行业资讯频道。

阅读原文内容投诉

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

软考中级精品资料免费领

  • 历年真题答案解析
  • 备考技巧名师总结
  • 高频考点精准押题
  • 2024年上半年信息系统项目管理师第二批次真题及答案解析(完整版)

    难度     813人已做
    查看
  • 【考后总结】2024年5月26日信息系统项目管理师第2批次考情分析

    难度     354人已做
    查看
  • 【考后总结】2024年5月25日信息系统项目管理师第1批次考情分析

    难度     318人已做
    查看
  • 2024年上半年软考高项第一、二批次真题考点汇总(完整版)

    难度     435人已做
    查看
  • 2024年上半年系统架构设计师考试综合知识真题

    难度     224人已做
    查看

相关文章

发现更多好内容

猜你喜欢

AI推送时光机
位置:首页-资讯-数据库
咦!没有更多了?去看看其它编程学习网 内容吧
首页课程
资料下载
问答资讯