yum在线安装

1、下载并安装MySQL官方的 Yum Repository

[root@node1 ~]# wget -c https://dev.mysql.com/get/mysql80-community-release-el7-5.noarch.rpm

2、添加 MySQL Yum Repository

[root@node1 ~]# yum localinstall mysql80-community-release-el7-5.noarch.rpm -y

3、选择安装发行版

前提: 安装YUM 

[root@node1 ~]# yum-config-manager --disable mysql80-community   #禁用8.0
[root@node1 ~]# yum-config-manager --enable mysql57-community    #启用5.7

验证

[root@node1 ~]# yum repolist enabled | grep -i ^mysql
mysql-connectors-community/x86_64       MySQL Connectors Community           230
mysql-tools-community/x86_64            MySQL Tools Community                138
mysql57-community/x86_64                MySQL 5.7 Community Server           564

4、在线安装

[root@node1 ~]# yum install -y mysql-community-server

5、启动数据

[root@node1 ~]# systemctl enable --now mysqld

6、登陆

[root@node1 ~]# tmp_pwd=`awk '/temporary password/ {print $NF}' /var/log/mysqld.log`
[root@node1 ~]# mysql -uroot -p$tmp_pwd
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 5.7.37 MySQL Community Server (GPL)

Copyright (c) 2000, 2022, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

 

文章链接: https://www.mfisp.com/16700.html

文章标题:yum在线安装

文章版权:梦飞科技所发布的内容,部分为原创文章,转载请注明来源,网络转载文章如有侵权请联系我们!

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

点点赞赏,手留余香

给TA打赏
共0人
还没有人赞赏,快来当第一个赞赏的人吧!
    投稿分享

    YAML的字典

    2023-2-14 16:54:31

    建站教程投稿分享

    rpm包离线安装

    2023-2-15 16:32:38

    0 条回复 A文章作者 M管理员
    如果喜欢,请评论一下~
    欢迎您,新朋友,感谢参与互动!
      暂无讨论,说说你的看法吧
    个人中心
    购物车
    优惠劵
    今日签到
    私信列表
    搜索

    梦飞科技 - 最新云主机促销服务器租用优惠

    可以介绍下你们的服务器产品么

    云服务器你们是怎么收费的呢

    租用vps现在有优惠活动吗