iis服务器助手广告广告
返回顶部
首页 > 资讯 > 数据库 >CentOS7.4怎么用rpm包安装mysql5.7.17
  • 414
分享到

CentOS7.4怎么用rpm包安装mysql5.7.17

2024-04-02 19:04:59 414人浏览 独家记忆
摘要

本篇内容介绍了“Centos7.4怎么用rpm包安装Mysql5.7.17”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,

本篇内容介绍了“Centos7.4怎么用rpm包安装Mysql5.7.17”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!

操作系统环境:

  1. CentOS Linux release 7.4.1708 (Core)

mysql版本:5.7.17

一,卸载mariadb-lib

  1. [root@iZ2ze6jo3o3bqbcongnypqZ lib]# rpm -qa|grep mariadb

  2. mariadb-libs-5.5.56-2.el7.x86_64 


  3. [root@iZ2ze6jo3o3bqbcongnypqZ ~]# yum -y remove mariadb-libs-5.5.56-2.el7.x86_64

  4. Loaded plugins: fastestmirror

  5. Resolving Dependencies

  6. --> Running transaction check

  7. ---> Package mariadb-libs.x86_64 1:5.5.56-2.el7 will be erased

  8. --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64

  9. --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64

  10. --> Running transaction check

  11. ---> Package postfix.x86_64 2:2.10.1-6.el7 will be erased

  12. --> Processing Dependency: /usr/sbin/sendmail for package: redhat-lsb-core-4.1-27.el7.centos.1.x86_64

  13. --> Restarting Dependency Resolution with new changes.

  14. --> Running transaction check

  15. ---> Package redhat-lsb-core.x86_64 0:4.1-27.el7.centos.1 will be erased

  16. --> Finished Dependency Resolution


  17. Dependencies Resolved


  18. ==============================================================================================================================================================================================================================================================================

  19.  Package Arch Version Repository Size

  20. ==============================================================================================================================================================================================================================================================================

  21. Removing:

  22.  mariadb-libs x86_64 1:5.5.56-2.el7 @base 4.4 M

  23. Removing for dependencies:

  24.  postfix x86_64 2:2.10.1-6.el7 @anaconda 12 M

  25.  redhat-lsb-core x86_64 4.1-27.el7.centos.1 @base 45 k


  26. Transaction Summary

  27. ==============================================================================================================================================================================================================================================================================

  28. Remove 1 Package (+2 Dependent packages)


  29. Installed size: 17 M

  30. Downloading packages:

  31. Running transaction check

  32. Running transaction test

  33. Transaction test succeeded

  34. Running transaction

  35.   Erasing : redhat-lsb-core-4.1-27.el7.centos.1.x86_64 1/3 

  36.   Erasing : 2:postfix-2.10.1-6.el7.x86_64 2/3 

  37.   Erasing : 1:mariadb-libs-5.5.56-2.el7.x86_64 3/3 

  38.   Verifying : 1:mariadb-libs-5.5.56-2.el7.x86_64 1/3 

  39.   Verifying : 2:postfix-2.10.1-6.el7.x86_64 2/3 

  40.   Verifying : redhat-lsb-core-4.1-27.el7.centos.1.x86_64 3/3 


  41. Removed:

  42.   mariadb-libs.x86_64 1:5.5.56-2.el7 


  43. Dependency Removed:

  44.   postfix.x86_64 2:2.10.1-6.el7 redhat-lsb-core.x86_64 0:4.1-27.el7.centos.1 


  45. Complete!

undefined


二,下载mysql5.7.17rpm安装包,具体是mysql-5.7.17-1.el7.x86_64.rpm-bundle.tar

  1. wget https://downloads.mysql.com/archives/get/file/mysql-5.7.17-1.el7.x86_64.rpm-bundle.tar

三,解压


  1. [root@iZ2ze6jo3o3bqbcongnyppZ ~]# tar -xvf mysql-5.7.17-1.el7.x86_64.rpm-bundle.tar


  1. -rw-r--r-- 1 7155 31415 25037548 Nov 30 2016 mysql-commUnity-client-5.7.17-1.el7.x86_64.rpm

  2. -rw-r--r-- 1 7155 31415 277812 Nov 30 2016 mysql-community-common-5.7.17-1.el7.x86_64.rpm

  3. -rw-r--r-- 1 7155 31415 3774276 Nov 30 2016 mysql-community-devel-5.7.17-1.el7.x86_64.rpm

  4. -rw-r--r-- 1 7155 31415 45474744 Nov 30 2016 mysql-community-embedded-5.7.17-1.el7.x86_64.rpm

  5. -rw-r--r-- 1 7155 31415 23925668 Nov 30 2016 mysql-community-embedded-compat-5.7.17-1.el7.x86_64.rpm

  6. -rw-r--r-- 1 7155 31415 126047424 Nov 30 2016 mysql-community-embedded-devel-5.7.17-1.el7.x86_64.rpm

  7. -rw-r--r-- 1 7155 31415 2237116 Nov 30 2016 mysql-community-libs-5.7.17-1.el7.x86_64.rpm

  8. -rw-r--r-- 1 7155 31415 2112724 Nov 30 2016 mysql-community-libs-compat-5.7.17-1.el7.x86_64.rpm

  9. -rw-r--r-- 1 7155 31415 54571580 Nov 30 2016 mysql-community-minimal-debuginfo-5.7.17-1.el7.x86_64.rpm

  10. -rw-r--r-- 1 7155 31415 169496800 Nov 30 2016 mysql-community-server-5.7.17-1.el7.x86_64.rpm

  11. -rw-r--r-- 1 7155 31415 14478292 Nov 30 2016 mysql-community-server-minimal-5.7.17-1.el7.x86_64.rpm

  12. -rw-r--r-- 1 7155 31415 116682212 Nov 30 2016 mysql-community-test-5.7.17-1.el7.x86_64.rpm

四,安装

要按照如下顺序安装

  1. [root@iZ2ze6jo3o3bqbcongnyppZ ~]# rpm -ivh mysql-community-common-5.7.17-1.el7.x86_64.rpm

  2. [root@iZ2ze6jo3o3bqbcongnyppZ ~]# rpm -ivh mysql-community-libs-5.7.17-1.el7.x86_64.rpm

  3. [root@iZ2ze6jo3o3bqbcongnyppZ ~]# rpm -ivh mysql-community-libs-compat-5.7.17-1.el7.x86_64

  4. [root@iZ2ze6jo3o3bqbcongnyppZ ~]# rpm -ivh mysql-community-devel-5.7.17-1.el7.x86_64

  5. [root@iZ2ze6jo3o3bqbcongnyppZ ~]# rpm -ivh mysql-community-client-5.7.17-1.el7.x86_64.rpm

  6. [root@iZ2ze6jo3o3bqbcongnyppZ ~]# rpm -ivh mysql-community-server-5.7.17-1.el7.x86_64.rpm

在安装server的时候报错


  1. [root@iZ2ze6jo3o3bqbcongnypoZ ~]# rpm -ivh mysql-community-server-5.7.17-1.el7.x86_64.rpm

  2. warning: mysql-community-server-5.7.17-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

  3. error: Failed dependencies:

  4.     libaio.so.1()(64bit) is needed by mysql-community-server-5.7.17-1.el7.x86_64

  5.     libaio.so.1(LIBAIO_0.1)(64bit) is needed by mysql-community-server-5.7.17-1.el7.x86_64

  6.     libaio.so.1(LIBAIO_0.4)(64bit) is needed by mysql-community-server-5.7.17-1.el7.x86_64


缺少libaio.so,用yum安装上:


  1. [root@iZ2ze6jo3o3bqbcongnypoZ ~]# yum install libaio*

  2. Loaded plugins: fastestmirror

  3. Loading mirror speeds from cached hostfile

  4.  * base: mirrors.cloud.aliyuncs.com

  5.  * epel: mirrors.cloud.aliyuncs.com

  6.  * extras: mirrors.cloud.aliyuncs.com

  7.  * updates: mirrors.cloud.aliyuncs.com

  8. Resolving Dependencies

  9. --> Running transaction check

  10. ---> Package libaio.x86_64 0:0.3.109-13.el7 will be installed

  11. ---> Package libaio-devel.x86_64 0:0.3.109-13.el7 will be installed

  12. --> Finished Dependency Resolution


  13. Dependencies Resolved


  14. ==============================================================================================================================================================================================================================================================================

  15.  Package Arch Version Repository Size

  16. ==============================================================================================================================================================================================================================================================================

  17. Installing:

  18.  libaio x86_64 0.3.109-13.el7 base 24 k

  19.  libaio-devel x86_64 0.3.109-13.el7 base 13 k


  20. Transaction Summary

  21. ==============================================================================================================================================================================================================================================================================

  22. Install 2 Packages


  23. Total download size: 37 k

  24. Installed size: 46 k

  25. Is this ok [y/d/N]: y

  26. Downloading packages:

  27. (1/2): libaio-0.3.109-13.el7.x86_64.rpm | 24 kB 00:00:00 

  28. (2/2): libaio-devel-0.3.109-13.el7.x86_64.rpm | 13 kB 00:00:00 

  29. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

  30. Total 243 kB/s | 37 kB 00:00:00 

  31. Running transaction check

  32. Running transaction test

  33. Transaction test succeeded

  34. Running transaction

  35. Warning: RPMDB altered outside of yum.

  36.   Installing : libaio-0.3.109-13.el7.x86_64 1/2 

  37.   Installing : libaio-devel-0.3.109-13.el7.x86_64 2/2 

  38.   Verifying : libaio-0.3.109-13.el7.x86_64 1/2 

  39.   Verifying : libaio-devel-0.3.109-13.el7.x86_64 2/2 


  40. Installed:

  41.   libaio.x86_64 0:0.3.109-13.el7 libaio-devel.x86_64 0:0.3.109-13.el7 


  42. Complete!


五,找到密码:


找到数据库的初始密码,最后一行冒号后面的就是

  1. [root@iZ2ze6jo3o3bqbcongnypqZ mysql]# cat /var/log/mysqld.log 

  2. 2017-11-03T08:41:25.257336Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

  3. 2017-11-03T08:41:26.329912Z 0 [Warning] InnoDB: New log files created, LSN=45790

  4. 2017-11-03T08:41:26.543807Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.

  5. 2017-11-03T08:41:26.566468Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: c79a2e4b-c072-11e7-b809-00163e0ad76e.

  6. 2017-11-03T08:41:26.570349Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.

  7. 2017-11-03T08:41:26.571065Z 1 [Note] A temporary passWord is generated for root@localhost: 7PkQ:l<p2cpH


六,启动mysql


  1. [root@iZ2ze6jo3o3bqbcongnyppZ ~]# systemctl start mysqld.service

  2. [root@iZ2ze6jo3o3bqbcongnyppZ ~]# mysql -uroot -p

  3. Enter password: 

  4. Welcome to the MySQL monitor. Commands end with ; or \g.

  5. Your MySQL connection id is 3

  6. Server version: 5.7.17


  7. Copyright (c) 2000, 2016, oracle and/or its affiliates. All rights reserved.


  8. Oracle is a reGIStered trademark of Oracle Corporation and/or its

  9. affiliates. Other names may be trademarks of their respective

  10. owners.


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


  12. mysql>

七,修改密码

临时密码过期了,需要修改
  1. mysql> show databases;

  2. ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.


用如下命令修改

  1. ALTER USER 'root'@'localhost' IDENTIFIED BY 'yournew_password';


“CentOS7.4怎么用rpm包安装mysql5.7.17”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注编程网网站,小编将为大家输出更多高质量的实用文章!

您可能感兴趣的文档:

--结束END--

本文标题: CentOS7.4怎么用rpm包安装mysql5.7.17

本文链接: https://www.lsjlt.com/news/59330.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • CentOS7.4怎么用rpm包安装mysql5.7.17
    本篇内容介绍了“CentOS7.4怎么用rpm包安装mysql5.7.17”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,...
    99+
    2022-10-18
  • 用rpm包在centos7.4上安装mysql-5.7.24-1.el7.x86_64
    CentOS7.4系统信息[root@localhost iso]# uname -aLinux localhost.localdomain 3.10.0-693.el7.x86_64 #1 SMP Tue...
    99+
    2022-10-18
  • CentOS中怎么使用RPM包安装redis
    这篇“CentOS中怎么使用RPM包安装redis”文章的知识点大部分人都不太理解,所以小编给大家总结了以下内容,内容详细,步骤清晰,具有一定的借鉴价值,希望大家阅读完这篇文章能有所收获,下面我们一起来看看这篇“CentOS中怎么使用RPM...
    99+
    2023-06-27
  • MySQL使用rpm包安装
    MySQL使用rpm包安装 安装 下载mysql rpm 安装包 。选择对应的操作系统版本 官网地址 下载对应的rpm包 mysql-community-common-5.7.29-1.el7.x86_64.rpmmysql-communi...
    99+
    2023-08-22
    mysql linux 服务器
  • 怎么在Arch Linux上安装RPM包
    这篇文章将为大家详细讲解有关怎么在Arch Linux上安装RPM包,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。1、 安装 rpmextractrpmextract 是一个用来解压 RPM 的工具,它会...
    99+
    2023-06-16
  • linux系统rpm安装包用法
    本篇内容介绍了“linux系统rpm安装包用法”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!rpm好像不能指定安装路径!   &n...
    99+
    2023-06-10
  • Mysql5.7怎么在OL 6上以RPM包安装
    本篇内容主要讲解“Mysql5.7怎么在OL 6上以RPM包安装”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“Mysql5.7怎么在OL 6上以RPM包安装”吧...
    99+
    2022-10-18
  • SuSE11下如何使用rpm安装包安装MySQL5.5.60
    下文主要给大家带来SuSE11下如何使用rpm安装包安装MySQL5.5.60,希望这些内容能够带给大家实际用处,这也是我编辑SuSE11下如何使用rpm安装包安装MySQL5.5.60这篇文章的主要目的。...
    99+
    2022-10-18
  • Linux下RPM软件包怎么安装与卸载
    本篇内容主要讲解“Linux下RPM软件包怎么安装与卸载”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“Linux下RPM软件包怎么安装与卸载”吧!在 Linux 操作系统下,几乎所有的软件均通过...
    99+
    2023-06-13
  • suse rpm怎么安装mysql
    本篇内容介绍了“suse rpm怎么安装mysql”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!  sus...
    99+
    2022-10-18
  • 怎么用RPM方式安装MySQL5.6
    这篇文章主要讲解了“怎么用RPM方式安装MySQL5.6”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“怎么用RPM方式安装MySQL5.6”吧! 1.检查...
    99+
    2022-10-18
  • Linux下如何使用RPM包安装Dovecot
    这篇文章将为大家详细讲解有关Linux下如何使用RPM包安装Dovecot,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。Dovecot介绍MRA邮件取回代理也有很多如courier-imap,cyrus-...
    99+
    2023-06-27
  • CentOS7.4环境下怎么用源码安装Mysql 5.7.26
    本篇内容主要讲解“CentOS7.4环境下怎么用源码安装Mysql 5.7.26”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“CentOS7.4环境下怎么用源码...
    99+
    2022-10-18
  • 在CentOS 7上使用RPM包安装MySQL 5.7
    shell> wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.18-1.el7.x86_64.rpm-bundle.tarsh...
    99+
    2022-10-18
  • RHEL 6.7利用rpm完整包安装MySQL-5.6.30
    利用rpm完整包安装MySQL(MySQL-server-5.6.30 for rhel 6.7_64bit) 一、检查操作系统上是否安装了MySQL [root@mydb1 backup]# r...
    99+
    2022-10-18
  • Linux平台用RPM包方式安装Mysql 5.7
    这篇文章主要讲解了“Linux平台用RPM包方式安装Mysql 5.7”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“Linux平台用RPM包方式安装Mysq...
    99+
    2022-10-18
  • 如何使用rpm包方式安装Percona server
    这篇文章主要介绍了如何使用rpm包方式安装Percona server,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。Percona Xtra...
    99+
    2022-10-18
  • 怎样使用rpm安装MySQL
    这篇文章将为大家详细讲解有关怎样使用rpm安装MySQL,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。使用rpm安装MySQL的方法:首先下载rpm包,并开始安装serv...
    99+
    2022-10-18
  • CentOS VSFTPD安装时RPM软件包安装的方法是怎样的
    这期内容当中小编将会给大家带来有关CentOS VSFTPD安装时RPM软件包安装的方法是怎样的,文章内容丰富且以专业的角度为大家分析和叙述,阅读完这篇文章希望大家可以有所收获。CentOS Linux和与之对应版本号的RHEL发行版具有软...
    99+
    2023-06-16
  • linux的rpm包怎么用
    这篇文章主要讲解了“linux的rpm包怎么用”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“linux的rpm包怎么用”吧!在linux中,rpm包是一种通过资料库管理的方式将所需要的软件安...
    99+
    2023-06-29
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作