使用rpm安装mysql5.6(简单安装 实验使用)

  1. [[email protected] mysql]# cd /usr
  2. [[email protected] mysql]# mkdir mysql
  3. [[email protected] mysql]# cd mysql
  4. [[email protected] mysql]# wget https://cdn.mysql.com//Downloads/MySQL-5.6/MySQL-5.6.36-1.el7.x86_64.rpm-bundle.tar
  5. [[email protected] mysql]# tar -xf MySQL-5.6.36-1.el7.x86_64.rpm-bundle.tar
  6. [[email protected] mysql]# ls
  7. MySQL-5.6.36-1.el7.x86_64.rpm-bundle.tar MySQL-devel-5.6.36-1.el7.x86_64.rpm MySQL-server-5.6.36-1.el7.x86_64.rpm MySQL-shared-compat-5.6.36-1.el7.x86_64.rpm
  8. MySQL-client-5.6.36-1.el7.x86_64.rpm MySQL-embedded-5.6.36-1.el7.x86_64.rpm MySQL-shared-5.6.36-1.el7.x86_64.rpm MySQL-test-5.6.36-1.el7.x86_64.rpm
  9. [[email protected] mysql]# rmp -i MySQL-devel-5.6.36-1.el7.x86_64.rpm
  10. [[email protected] mysql]# rmp -i MySQL-client-5.6.36-1.el7.x86_64.rpm
  11. [[email protected] mysql]# rpm -ivh MySQL-server-5.6.36-1.el7.x86_64.rpm
  12. 警告:MySQL-server-5.6.36-1.el7.x86_64.rpm: 头V3 DSA/SHA1 Signature, 密钥 ID 5072e1f5: NOKEY
  13. 准备中... ################################# [100%]
  14.    file /usr/share/mysql/charsets/README from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  15.    file /usr/share/mysql/czech/errmsg.sys from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  16.    file /usr/share/mysql/danish/errmsg.sys from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  17.    file /usr/share/mysql/dutch/errmsg.sys from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  18.    file /usr/share/mysql/english/errmsg.sys from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  19.    file /usr/share/mysql/estonian/errmsg.sys from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  20.    file /usr/share/mysql/french/errmsg.sys from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  21.    file /usr/share/mysql/german/errmsg.sys from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  22.    file /usr/share/mysql/greek/errmsg.sys from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  23.    file /usr/share/mysql/hungarian/errmsg.sys from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  24.    file /usr/share/mysql/italian/errmsg.sys from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  25.    file /usr/share/mysql/japanese/errmsg.sys from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  26.    file /usr/share/mysql/korean/errmsg.sys from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  27.    file /usr/share/mysql/norwegian-ny/errmsg.sys from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  28.    file /usr/share/mysql/norwegian/errmsg.sys from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  29.    file /usr/share/mysql/polish/errmsg.sys from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  30.    file /usr/share/mysql/portuguese/errmsg.sys from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  31.    file /usr/share/mysql/romanian/errmsg.sys from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  32.    file /usr/share/mysql/russian/errmsg.sys from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  33.    file /usr/share/mysql/serbian/errmsg.sys from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  34.    file /usr/share/mysql/slovak/errmsg.sys from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  35.    file /usr/share/mysql/spanish/errmsg.sys from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  36.    file /usr/share/mysql/swedish/errmsg.sys from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  37.    file /usr/share/mysql/ukrainian/errmsg.sys from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  38.    file /usr/share/mysql/charsets/Index.xml from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  39.    file /usr/share/mysql/charsets/armscii8.xml from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  40.    file /usr/share/mysql/charsets/ascii.xml from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  41.    file /usr/share/mysql/charsets/cp1250.xml from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  42.    file /usr/share/mysql/charsets/cp1251.xml from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  43.    file /usr/share/mysql/charsets/cp1256.xml from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  44.    file /usr/share/mysql/charsets/cp1257.xml from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  45.    file /usr/share/mysql/charsets/cp850.xml from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  46.    file /usr/share/mysql/charsets/cp852.xml from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  47.    file /usr/share/mysql/charsets/cp866.xml from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  48.    file /usr/share/mysql/charsets/dec8.xml from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  49.    file /usr/share/mysql/charsets/geostd8.xml from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  50.    file /usr/share/mysql/charsets/greek.xml from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  51.    file /usr/share/mysql/charsets/hebrew.xml from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  52.    file /usr/share/mysql/charsets/hp8.xml from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  53.    file /usr/share/mysql/charsets/keybcs2.xml from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  54.    file /usr/share/mysql/charsets/koi8r.xml from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  55.    file /usr/share/mysql/charsets/koi8u.xml from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  56.    file /usr/share/mysql/charsets/latin1.xml from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  57.    file /usr/share/mysql/charsets/latin2.xml from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  58.    file /usr/share/mysql/charsets/latin5.xml from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  59.    file /usr/share/mysql/charsets/latin7.xml from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  60.    file /usr/share/mysql/charsets/macce.xml from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  61.    file /usr/share/mysql/charsets/macroman.xml from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  62.    file /usr/share/mysql/charsets/swe7.xml from install of MySQL-server-5.6.36-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
  63. //冲突了 删除mariadb-libs-1:5.5.35-3.el7.x86_64
  64. [[email protected] mysql]# rpm -e mariadb-libs-1:5.5.35-3.el7.x86_64
  65. 错误:依赖检测失败:
  66.    libmysqlclient.so.18()(64bit) 被 (已安裝) postfix-2:2.10.1-6.el7.x86_64 需要
  67.    libmysqlclient.so.18(libmysqlclient_18)(64bit) 被 (已安裝) postfix-2:2.10.1-6.el7.x86_64 需要
  68. [[email protected] mysql]# rpm -e --nodeps mariadb-libs-1:5.5.35-3.el7.x86_64
  69. [[email protected] mysql]# rpm -ivh MySQL-server-5.6.36-1.el7.x86_64.rpm
  70. 警告:MySQL-server-5.6.36-1.el7.x86_64.rpm: 头V3 DSA/SHA1 Signature, 密钥 ID 5072e1f5: NOKEY
  71. 准备中... ################################# [100%]
  72. 正在升级/安装...
  73.    1:MySQL-server-5.6.36-1.el7 ################################# [100%]
  74. 警告:用户mysql 不存在 - 使用root
  75. 警告:群组mysql 不存在 - 使用root
  76. 警告:用户mysql 不存在 - 使用root
  77. 警告:群组mysql 不存在 - 使用root
  78. FATAL ERROR: please install the following Perl modules before executing /usr/bin/mysql_install_db:
  79. Data::Dumper
  80.  
  81. //解决上面的error
  82. [[email protected] mysql]# yum install -y perl perl-devel
  83. //卸载重装
  84. [[email protected] mysql]# rpm -e MySQL-server-5.6.36-1.el7.x86_64
  85. //没有报错
  86. [[email protected] mysql]# rpm -ivh MySQL-client-5.6.36-1.el7.x86_64.rpm
  87. 警告:MySQL-client-5.6.36-1.el7.x86_64.rpm: 头V3 DSA/SHA1 Signature, 密钥 ID 5072e1f5: NOKEY
  88. 准备中... ################################# [100%]
  89. 正在升级/安装...
  90.    1:MySQL-client-5.6.36-1.el7 ################################# [100%]
  91. //启动报错
  92. [[email protected] mysql]# service mysql start
  93. Starting MySQL.. ERROR! The server quit without updating PID file (/var/lib/mysql/localhost.localdomain.pid).
  94. //网上看原因说是需要这个
  95. [[email protected] mysql]# yum install -y perl-Data-Dumper
  96. //还是报错
  97. [[email protected] mysql]# service mysql start
  98. Starting MySQL. ERROR! The server quit without updating PID file (/var/lib/mysql/localhost.localdomain.pid).
  99. //做了这个处理之后就不报错了 这个是安装后必须的一步 会安装系统表 不知道为什么不在rpm中处理这一步
  100. [[email protected] mysql]# mysql_install_db --user=mysql --basedir=/usr/ --ldata=/var/lib/mysql/
  101. //启动成功
  102. [[email protected] mysql]# service mysql start
  103. Starting MySQL. SUCCESS!
  104. //客户端连接
  105. [[email protected] mysql]# mysql
  106. Welcome to the MySQL monitor. Commands end with ; or \g.
  107. Your MySQL connection id is 1
  108. Server version: 5.6.36 MySQL Community Server (GPL)
  109.  
  110. Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  111.  
  112. Oracle is a registered trademark of Oracle Corporation and/or its
  113. affiliates. Other names may be trademarks of their respective
  114. owners.
  115.  
  116. Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.
  117.  
  118. mysql> show databases
  119.     -> ;
  120. +--------------------+
  121. | Database |
  122. +--------------------+
  123. | information_schema |
  124. | mysql |
  125. | performance_schema |
  126. | test |
  127. +--------------------+
  128. 4 rows in set (0.01 sec)
  129.  
  130. mysql> quit
  131. Bye
时间: 2024-10-08 17:45:54

使用rpm安装mysql5.6(简单安装 实验使用)的相关文章

编译安装MYSQL5.6.26--【动手实验】

mysql编译详细参数官方地址 http://dev.mysql.com/doc/refman/5.6/en/source-configuration-options.html 自5.5以后的版本都需要cmake编译安装,so...先安装cmake编译器 安装必要的组件  yum -y install cmake  yum -y install bison  yum -y install ncurses-devel     添加账户  groupadd mysql  useradd mysql 

cmake编译安装mysql5.5

CMAKE方式编译安装Mysql5.5 1.源码cmake方式编译安装MySQL5.5.32 安装前先安装: yum install ncurses-devel -y 1.1 下载Mysql和cmake安装包: wget http://wwwNaNake.org/files/v2.8/cmake-2.8.8.tar.gz 1.2 查看系统环境 cat /etc/redhat-release uname -r uname -m 1.3 安装cmake包 tar zxf cmake-2.8.8.ta

CMAKE方式编译安装Mysql5.5

1.源码cmake方式编译安装MySQL5.5.32 安装前先安装: yum install ncurses-devel -y 1.1 下载Mysql和cmake安装包: wgethttp://wwwNaNake.org/files/v2.8/cmake-2.8.8.tar.gz 1.2 查看系统环境 cat/etc/redhat-release uname-r uname-m 1.3 安装cmake包 tarzxf cmake-2.8.8.tar.gz cdcmake-2.8.8 ./conf

SuSE11安装MySQL5.1.73:RPM安装方式(超简单入门级安装)

注:此安装过程只有关键步骤,仅适合入门学习使用 一. 环境准备 64位操作系统,SuSE版本11sp3.(注:kingtry是我的主机名) kingtry:~ # uname -a Linux kingtry 3.0.76-0.11-default #1 SMP Fri Jun 14 08:21:43 UTC 2013 (ccab990) x86_64 x86_64 x86_64 GNU/Linux kingtry:~ # cat /etc/SuSE-release  SUSE Linux En

CentOS6.5和RedHat6.5下以rpm方式安装mysql-5.6.20

转帖;http://blog.csdn.net/mw08091020/article/details/39234207 a.检查下linux是不是已经安装了mysql rpm -qa | grep -i mysql #如果安装了先卸载旧的版本 yum -y remove mysql... b.下载需要的安装包,下载地址: http://cdn.mysql.com/Downloads/MySQL-5.6/MySQL-client-5.6.20-1.el6.x86_64.rpm http://cdn

yum 安装 MySQL5.7 最简单的方法!

yum 安装 MySQL5.7 最简单的方法! 正文 第一步 安装CentOS 略 CentOS 版本为6.5 第二步 安装 yum 仓库列表 使用yum 安装mysql,要使用mysql的yum仓库,先从官网下载适合你系统的仓库 https://dev.mysql.com/downloads/repo/yum/ 我下载的是 mysql57-community-release-el6-11.noarch.rpm 安装 yum localinstall mysql-community-releas

如何用CentOS7安装MySQL5.7(RPM安装)

 一. MySQL 5.7 主要特性: 原生支持 Systemd 更好的性能:对于多核 CPU .固态硬盘.锁有着更好的优化 更好的 InnoDB 存储引擎 更为健壮的复制功能:复制带来了数据完全不丢失的方案,传统金融客户也可以选择使用MySQL 数据库. 注: mysql-5.6.3 已经支持了多线程的主从复制 新增 sys 库:以后这会是 DBA 访问最频繁的库 二.MySQL版本 SQL结构化查询语言 社区版Community Edition.商业版Enterprise Edition A

CentOS 7.4下使用yum安装MySQL5.7.20 最简单的

CentOS7默认数据库是mariadb, 但是 好多用的都是mysql ,但是CentOS7的yum源中默认好像是没有mysql的. 上一篇安装的是5.6的但是我想安装5.7的  yum安装是最简单的 尝试过编译安装各种问题,最后就决定用yum. 1.卸载  先停掉mysql进程   没有安装过的可以直接跳过 pkill -9 mysqld rpm -qa|grep -i mysql 用命令 yum -y remove yum -y remove mysql-community-client-

无外网情况下RPM方式安装MySQL5.6

RPM方式安装MySQL5.6 a. 检查MySQL及相关RPM包,是否安装,如果有安装,则移除(rpm –e 名称) 1 [[email protected] ~]# rpm -qa | grep -i mysql 2 mysql-libs-5.1.66-2.el6_3.x86_64 3 [[email protected] ~]# yum -y remove mysql-libs* b. 下载Linux对应的RPM包,如:CentOS6.4_64对应的RPM包,如下:这里给出我下载好的包,官

CentOS下以RPM方式安装MySQL5.5

首先去mySQL官网下载页面: http://dev.mysql.com/downloads/mysql/#downloads Select Platform 选择  Oracle & Red Hat Linux 4 & 5 分别下载以下三个文件(由于我的机器是32位,下面是32位版本的包,如果你的机器是64位的请下载64位版本): 1. Red Hat & Oracle Linux 5 (x86, 32-bit), RPM Package MySQL Server 2. Red