iis服务器助手广告广告
返回顶部
首页 > 资讯 > 数据库 >Linux平台用RPM包方式安装Mysql 5.7
  • 1000
分享到

Linux平台用RPM包方式安装Mysql 5.7

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

这篇文章主要讲解了“linux平台用RPM包方式安装Mysql 5.7”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“Linux平台用RPM包方式安装mysq

这篇文章主要讲解了“linux平台用RPM包方式安装Mysql 5.7”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“Linux平台用RPM包方式安装mysql 5.7”吧!

在 Mysql 官网下载 RPM 的 bundle 包并解压。

[root@localhost mysql5.7]# tar xvf mysql-5.7.12-1.el6.x86_64.rpm-bundle.tar

单独安装 Server 包,报依赖关系的错误。

[root@T400-kelong software]# rpm -ivh mysql-commUnity-server-5.7.10-1.el6.x86_64.rpm 
warning: mysql-community-server-5.7.10-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
error: Failed dependencies:
mysql-community-client(x86-64) = 5.7.10-1.el6 is needed by mysql-community-server-5.7.10-1.el6.x86_64
mysql-community-common(x86-64) = 5.7.10-1.el6 is needed by mysql-community-server-5.7.10-1.el6.x86_64

将所需的包添加上,依然报错,缺少另外一个包。

[root@T400-kelong software]# rpm -ivh mysql-community-server-5.7.10-1.el6.x86_64.rpm mysql-community-common-5.7.10-1.el6.x86_64.rpm mysql-community-client-5.7.10-1.el6.x86_64.rpm 
warning: mysql-community-server-5.7.10-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
error: Failed dependencies:
mysql-community-libs(x86-64) = 5.7.10-1.el6 is needed by mysql-community-client-5.7.10-1.el6.x86_64

将所需的包添加上,继续报错,和系统自带的 5.1 版本冲突。

[root@T400-kelong software]# rpm -ivh mysql-community-server-5.7.10-1.el6.x86_64.rpm mysql-community-common-5.7.10-1.el6.x86_64.rpm mysql-community-client-5.7.10-1.el6.x86_64.rpm mysql-community-libs-5.7.10-1.el6.x86_64.rpm 
warning: mysql-community-server-5.7.10-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                ########################################### [100%]
file /usr/share/mysql/czech/errmsg.sys from install of mysql-community-common-5.7.10-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.73-5.el6_6.x86_64
file /usr/share/mysql/danish/errmsg.sys from install of mysql-community-common-5.7.10-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.73-5.el6_6.x86_64

卸载掉报错的mysql 5.1安装包

[root@T400-kelong software]# yum remove mysql-libs-5.1.73-5.el6_6.x86_64
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Remove Process
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
--> Running transaction check
---> Package mysql-libs.x86_64 0:5.1.73-5.el6_6 will be erased
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: perl-DBD-MySQL-4.013-3.el6.x86_64
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: perl-DBD-MySQL-4.013-3.el6.x86_64
--> Running transaction check
---> Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================
 Package                                  Arch                             Version                                     Repository                       Size
=============================================================================================================================================================
Removing:
 mysql-libs                               x86_64                           5.1.73-5.el6_6                              @base                           4.0 M
Removing for dependencies:
 perl-DBD-MySQL                           x86_64                           4.013-3.el6                                 @base                           338 k

Transaction Summary
=============================================================================================================================================================
Remove        2 Package(s)

Installed size: 4.4 M
Is this ok [y/N]: y

安装 RPM 包

[root@T400-kelong software]# rpm -ivh mysql-community-server-5.7.10-1.el6.x86_64.rpm mysql-community-common-5.7.10-1.el6.x86_64.rpm mysql-community-client-5.7.10-1.el6.x86_64.rpm mysql-community-libs-5.7.10-1.el6.x86_64.rpm 
warning: mysql-community-server-5.7.10-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                ########################################### [100%]
   1:mysql-community-common ########################################### [ 25%]
   2:mysql-community-libs   ########################################### [ 50%]
   3:mysql-community-client ########################################### [ 75%]
   4:mysql-community-server ########################################### [100%]

启动数据库。

[root@T400-kelong sbin]# service mysqld start
初始化 MySQL 数据库:                                      [确定]
正在启动 mysqld:                                          [确定]
[root@T400-kelong sbin]# service mysqld status
mysqld (pid  4782) 正在运行...

[root@T400-kelong sbin]# ps -ef|grep mysql
root      4586     1  0 21:11 pts/1    00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --Socket=/var/lib/mysql/mysql.sock --pid-file=/var/run/mysqld/mysqld.pid --basedir=/usr --user=mysql
mysql     4782  4586  2 21:11 pts/1    00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock
root      4847  3857  0 21:11 pts/1    00:00:00 grep mysql


使用临时密码登录到 ROOT 用户,更改 ROOT 密码。

grep 'temporary passWord' /var/log/mysql/mysqld.log

[root@T400-kelong sbin]# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.10

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

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> alter user 'root'@'localhost' identified by 'System#2013';
Query OK, 0 rows affected (0.00 sec)

感谢各位的阅读,以上就是“Linux平台用RPM包方式安装Mysql 5.7”的内容了,经过本文的学习后,相信大家对Linux平台用RPM包方式安装Mysql 5.7这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是编程网,小编将为大家推送更多相关知识点的文章,欢迎关注!

您可能感兴趣的文档:

--结束END--

本文标题: Linux平台用RPM包方式安装Mysql 5.7

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

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

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

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

下载Word文档
猜你喜欢
  • Linux平台用RPM包方式安装Mysql 5.7
    这篇文章主要讲解了“Linux平台用RPM包方式安装Mysql 5.7”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“Linux平台用RPM包方式安装Mysq...
    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
  • MySQL 5.6.35 RPM包方式的安装
    Mysql 5.6.35版本 RPM包方式的安装 一.删除旧的RPM包: 查询 rpm -qa | grep -i mysql如果有需要先删除rpm -ev mysql-libs- --nodepsrpm ...
    99+
    2022-10-18
  • Linux内网离线安装nginx(rpm包安装方式)
    1、下载RPM离线安装包: 首先,先下载nginx的rpm包,下载地址:http://nginx.org/packages/centos/7/x86_64/RPMS/ 下载nginx-1.18.0-2.el7.ngx.x86_64.rp...
    99+
    2023-08-31
    linux nginx 运维 服务器 Powered by 金山文档
  • Linux平台下mysql三种安装方式比较
    MySQL在Linux平台下的安装包有RPM包、二进制包和源码包三种 (1)RPM包: 优点:安装简单,不需要过多的安装配置,适合初学者安装使用缺点:需要下载客户端和服务器端,当然现在都是可以捆绑下载了,安...
    99+
    2022-10-18
  • 关于linux-Centos 7下mysql 5.7.9的rpm包的安装方式
    环境介绍>>>>>>>>>>>>>>>>>>操作系统:Centos 7.1mysql数据库版本:m...
    99+
    2022-10-18
  • Percona MySQL 5.6 RPM包方式的安装过程
    今天就跟大家聊聊有关Percona MySQL 5.6 RPM包方式的安装过程,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。--解压安装包[root...
    99+
    2022-10-18
  • 如何用rpm方式安装mysql
    小编给大家分享一下如何用rpm方式安装mysql,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!查看安装以及卸载# 查看 rpm ...
    99+
    2022-10-18
  • Mysql for Linux怎么用rpm方式安装和配置
    这篇文章主要讲解了“Mysql for Linux怎么用rpm方式安装和配置”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“Mysql for Linux怎么...
    99+
    2022-10-18
  • 如何使用rpm方式安装mysql
    今天就跟大家聊聊有关如何使用rpm方式安装mysql,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。查看安装以及卸载# 查看 rpm&nb...
    99+
    2022-10-18
  • 如何使用rpm包方式安装Percona server
    这篇文章主要介绍了如何使用rpm包方式安装Percona server,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。Percona Xtra...
    99+
    2022-10-18
  • Centos7怎么用rpm方式安装mysql-5.5
    这篇文章主要讲解了“Centos7怎么用rpm方式安装mysql-5.5”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“Centos7怎么用rpm方式安装my...
    99+
    2022-10-18
  • Percona MySQL 5.7 Linux如何通用二进制包安装
    小编给大家分享一下Percona MySQL 5.7 Linux如何通用二进制包安装,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧...
    99+
    2022-10-18
  • linux安装部署mysql服务 tar.gz rpm两种安装方式教程
    一、介绍 本教程为linux下安装部署mysql服务,安装方式分为两种,一种tar.gz包安装,另一种为rpm包安装。 二、准备工作 服务器:linxu CentOS 7 mysql服务tar.gz版本:mysql-5.7.3...
    99+
    2023-09-03
    mysql linux 服务器 Powered by 金山文档
  • 【Electron Forge】基于Electron打包成Windows、MacOs、linux多个平台跨平台安装包的方法总结
    参考: 打包您的应用程序 | Electron Makers - Electron Forge forge.config.js的配置  module.exports = { packagerConfig: {}, rebuil...
    99+
    2023-09-07
    linux electron windows
  • linux下使用rpm和源码包方式安装mysql5.7的具体步骤
    本文主要给大家介绍linux下使用rpm和源码包方式安装mysql5.7的具体步骤,文章内容都是笔者用心摘选和编辑的,具有一定的针对性,对大家的参考意义还是比较大的,下面跟笔者一起了解下linux下使用rp...
    99+
    2022-10-18
  • Linux 下通过 tar 包方式安装 MySQL,详细教程
    写在前面:目前网络上大多数的安装教程采用的是 rpm 的方式,此种方式是需要虚拟机联网完成的,我介绍的是使用 tar 包的方式安装 mysql5.7 的方法。 首先要注意的一点是,在输入命令的时候你一定要注意你是在哪个文件夹下输入的命令,...
    99+
    2023-09-28
    linux mysql 数据库
  • linux采用binary方式如何安装mysql
    这篇文章给大家分享的是有关linux采用binary方式如何安装mysql的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。1、下载binary文件  在官网上下载 mysql-5....
    99+
    2022-10-18
  • linux中怎么使用yum方式安装mysql
    今天就跟大家聊聊有关linux中怎么使用yum方式安装mysql,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。linux下使用yum安装mysql&...
    99+
    2022-10-18
  • Linux下如何使用yum的方式安装mysql
    这篇文章将为大家详细讲解有关Linux下如何使用yum的方式安装mysql,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。\1. 先检查系统是否装有mysql[root@localhost ~]#...
    99+
    2023-06-27
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作