【MySQL】安装MySQL

// 查询

[[email protected] yum.repos.d]# yum install mysql

已加载插件:fastestmirror, langpacks

Repository base is listed more than once in the configuration

Repository updates is listed more than once in the configuration

Repository extras is listed more than once in the configuration

Repository centosplus is listed more than once in the configuration

Repository base is listed more than once in the configuration

Repository updates is listed more than once in the configuration

Repository extras is listed more than once in the configuration

Repository centosplus is listed more than once in the configuration

Loading mirror speeds from cached hostfile

软件包 1:mariadb-5.5.41-2.el7_0.x86_64 已安装并且是最新版本

无须任何处理

[[email protected] yum.repos.d]#

// 下载MySQL repo

[[email protected] tools]# wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm

--2015-07-04 00:43:49--  http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm

正在解析主机 repo.mysql.com (repo.mysql.com)... 23.13.186.195

正在连接 repo.mysql.com (repo.mysql.com)|23.13.186.195|:80... 已连接。

已发出 HTTP 请求,正在等待回应... 200 OK

长度:6140 (6.0K) [application/x-redhat-package-manager]

正在保存至: “mysql-community-release-el7-5.noarch.rpm”

100%[======================================>] 6,140       --.-K/s 用时 0.004s

2015-07-04 00:43:49 (1.53 MB/s) - 已保存 “mysql-community-release-el7-5.noarch.rpm” [6140/6140])

// 安装源

[[email protected] tools]# rpm -ivh mysql-community-release-el7-5.noarch.rpm

准备中...                          ################################# [100%]

正在升级/安装...

1:mysql-community-release-el7-5    ################################# [100%]

[[email protected] tools]#

// 更新repo

[[email protected] tools]# yum makecache

已加载插件:fastestmirror, langpacks

Repository base is listed more than once in the configuration

Repository updates is listed more than once in the configuration

Repository extras is listed more than once in the configuration

Repository centosplus is listed more than once in the configuration

Repository base is listed more than once in the configuration

Repository updates is listed more than once in the configuration

Repository extras is listed more than once in the configuration

Repository centosplus is listed more than once in the configuration

base                                                     | 3.6 kB     00:00

extras                                                   | 3.4 kB     00:00

mysql-connectors-community                               | 2.5 kB     00:00

mysql-tools-community                                    | 2.5 kB     00:00

mysql56-community                                        | 2.5 kB     00:00

updates                                                  | 3.4 kB     00:00

(1/6): mysql-connectors-community/x86_64/filelists_db      | 4.8 kB   00:00

(2/6): mysql-tools-community/x86_64/filelists_db           |  47 kB   00:00

(3/6): mysql56-community/x86_64/other_db                   |  26 kB   00:00

(4/6): mysql-connectors-community/x86_64/other_db          | 2.7 kB   00:00

(5/6): mysql-tools-community/x86_64/other_db               | 3.2 kB   00:00

(6/6): mysql56-community/x86_64/filelists_db               | 293 kB   00:00

Loading mirror speeds from cached hostfile

元数据缓存已建立

[[email protected] tools]#

// 安装mysql-server

[[email protected] tools]# yum install mysql-server

已加载插件:fastestmirror, langpacks

Repository base is listed more than once in the configuration

Repository updates is listed more than once in the configuration

Repository extras is listed more than once in the configuration

Repository centosplus is listed more than once in the configuration

Repository base is listed more than once in the configuration

Repository updates is listed more than once in the configuration

Repository extras is listed more than once in the configuration

Repository centosplus is listed more than once in the configuration

Loading mirror speeds from cached hostfile

正在解决依赖关系

--> 正在检查事务

---> 软件包 mariadb-server.x86_64.1.5.5.41-2.el7_0 将被 取代

--> 正在处理依赖关系 mariadb-server,它被软件包 akonadi-mysql-1.9.2-4.el7.x86_64 需要

---> 软件包 mysql-community-server.x86_64.0.5.6.25-2.el7 将被 舍弃

--> 正在处理依赖关系 mysql-community-common(x86-64) = 5.6.25-2.el7,它被软件包 mysql-community-server-5.6.25-2.el7.x86_64 需要

--> 正在处理依赖关系 mysql-community-client(x86-64) = 5.6.25-2.el7,它被软件包 mysql-community-server-5.6.25-2.el7.x86_64 需要

--> 正在检查事务

---> 软件包 mariadb.x86_64.1.5.5.41-2.el7_0 将被 取代

---> 软件包 mariadb-server.x86_64.1.5.5.41-2.el7_0 将被 取代

--> 正在处理依赖关系 mariadb-server,它被软件包 akonadi-mysql-1.9.2-4.el7.x86_64 需要

---> 软件包 mysql-community-client.x86_64.0.5.6.25-2.el7 将被 舍弃

--> 正在处理依赖关系 mysql-community-libs(x86-64) = 5.6.25-2.el7,它被软件包 mysql-community-client-5.6.25-2.el7.x86_64 需要

---> 软件包 mysql-community-common.x86_64.0.5.6.25-2.el7 将被 安装

--> 正在检查事务

---> 软件包 mariadb-libs.x86_64.1.5.5.41-2.el7_0 将被 取代

---> 软件包 mariadb-server.x86_64.1.5.5.41-2.el7_0 将被 取代

--> 正在处理依赖关系 mariadb-server,它被软件包 akonadi-mysql-1.9.2-4.el7.x86_64 需要

---> 软件包 mysql-community-libs.x86_64.0.5.6.25-2.el7 将被 舍弃

--> 解决依赖关系完成

错误:软件包:akonadi-mysql-1.9.2-4.el7.x86_64 (@anaconda)

需要:mariadb-server

正在删除: 1:mariadb-server-5.5.41-2.el7_0.x86_64 (@anaconda)

mariadb-server = 1:5.5.41-2.el7_0

取代,由: mysql-community-server-5.6.25-2.el7.x86_64 (mysql56-community)

未找到

您可以尝试添加 --skip-broken 选项来解决该问题

您可以尝试执行:rpm -Va --nofiles --nodigest

[[email protected] tools]#

// 删除 mariadb-server

[[email protected] tools]# yum remove mariadb-server

已加载插件:fastestmirror, langpacks

Repository base is listed more than once in the configuration

Repository updates is listed more than once in the configuration

Repository extras is listed more than once in the configuration

Repository centosplus is listed more than once in the configuration

Repository base is listed more than once in the configuration

Repository updates is listed more than once in the configuration

Repository extras is listed more than once in the configuration

Repository centosplus is listed more than once in the configuration

正在解决依赖关系

--> 正在检查事务

---> 软件包 mariadb-server.x86_64.1.5.5.41-2.el7_0 将被 删除

--> 正在处理依赖关系 mariadb-server,它被软件包 akonadi-mysql-1.9.2-4.el7.x86_64 需要

--> 正在检查事务

---> 软件包 akonadi-mysql.x86_64.0.1.9.2-4.el7 将被 删除

--> 解决依赖关系完成

依赖关系解决

================================================================================

Package              架构         版本                   源               大小

================================================================================

正在删除:

mariadb-server       x86_64       1:5.5.41-2.el7_0       @anaconda        56 M

为依赖而移除:

akonadi-mysql        x86_64       1.9.2-4.el7            @anaconda       9.6 k

事务概要

================================================================================

移除  1 软件包 (+1 依赖软件包)

安装大小:56 M

是否继续?[y/N]:y

Downloading packages:

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

警告:RPM 数据库已被非 yum 程序修改。

正在删除    : akonadi-mysql-1.9.2-4.el7.x86_64                            1/2

正在删除    : 1:mariadb-server-5.5.41-2.el7_0.x86_64                      2/2

验证中      : akonadi-mysql-1.9.2-4.el7.x86_64                            1/2

验证中      : 1:mariadb-server-5.5.41-2.el7_0.x86_64                      2/2

删除:

mariadb-server.x86_64 1:5.5.41-2.el7_0

作为依赖被删除:

akonadi-mysql.x86_64 0:1.9.2-4.el7

完毕!

[[email protected] tools]#

// 再次安装 mysql-server

[[email protected] tools]# yum install mysql-server

已加载插件:fastestmirror, langpacks

Repository base is listed more than once in the configuration

Repository updates is listed more than once in the configuration

Repository extras is listed more than once in the configuration

Repository centosplus is listed more than once in the configuration

Repository base is listed more than once in the configuration

Repository updates is listed more than once in the configuration

Repository extras is listed more than once in the configuration

Repository centosplus is listed more than once in the configuration

Loading mirror speeds from cached hostfile

正在解决依赖关系

--> 正在检查事务

---> 软件包 mysql-community-server.x86_64.0.5.6.25-2.el7 将被 安装

--> 正在处理依赖关系 mysql-community-common(x86-64) = 5.6.25-2.el7,它被软件包 mysql-community-server-5.6.25-2.el7.x86_64 需要

--> 正在处理依赖关系 mysql-community-client(x86-64) = 5.6.25-2.el7,它被软件包 mysql-community-server-5.6.25-2.el7.x86_64 需要

--> 正在检查事务

---> 软件包 mariadb.x86_64.1.5.5.41-2.el7_0 将被 取代

---> 软件包 mysql-community-client.x86_64.0.5.6.25-2.el7 将被 舍弃

--> 正在处理依赖关系 mysql-community-libs(x86-64) = 5.6.25-2.el7,它被软件包 mysql-community-client-5.6.25-2.el7.x86_64 需要

---> 软件包 mysql-community-common.x86_64.0.5.6.25-2.el7 将被 安装

--> 正在检查事务

---> 软件包 mariadb-libs.x86_64.1.5.5.41-2.el7_0 将被 取代

---> 软件包 mysql-community-libs.x86_64.0.5.6.25-2.el7 将被 舍弃

--> 解决依赖关系完成

依赖关系解决

================================================================================

Package                   架构      版本            源                    大小

================================================================================

正在安装:

mysql-community-client    x86_64    5.6.25-2.el7    mysql56-community     19 M

替换  mariadb.x86_64 1:5.5.41-2.el7_0

mysql-community-libs      x86_64    5.6.25-2.el7    mysql56-community    2.0 M

替换  mariadb-libs.x86_64 1:5.5.41-2.el7_0

mysql-community-server    x86_64    5.6.25-2.el7    mysql56-community     58 M

为依赖而安装:

mysql-community-common    x86_64    5.6.25-2.el7    mysql56-community    256 k

事务概要

================================================================================

安装  3 软件包 (+1 依赖软件包)

总下载量:79 M

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

Downloading packages:

警告:/var/cache/yum/x86_64/7/mysql56-community/packages/mysql-community-common-5.6.25-2.el7.x86_64.rpm: V3 DSA/SHA1 Signature, 密钥 ID 5072e1f5: NOKEY

mysql-community-common-5.6.25-2.el7.x86_64.rpm 的公钥尚未安装

(1/4): mysql-community-common-5.6.25-2.el7.x86_64.rpm      | 256 kB   00:01

(2/4): mysql-community-libs-5.6.25-2.el7.x86_64.rpm        | 2.0 MB   00:11

(3/4): mysql-community-client-5.6.25-2.el7.x86_64.rpm      |  19 MB   00:54

(4/4): mysql-community-ser 45% [=======         ] 502 kB/s |  36 MB   01:28 ETA

// 设置开机启动

[[email protected] tools]# systemctl enable mysqld

[[email protected] tools]#

// 手动启动

[[email protected] tools]# systemctl start mysqld

[[email protected] tools]#

时间: 2024-12-15 01:50:49

【MySQL】安装MySQL的相关文章

Ubuntu删除mysql 安装mysql

Ubuntu 14.0.4 64 mysql 5.6 niginx 1.4.4 php 3.6 Ubuntu下彻底卸载mysql 做个记录: 1.删除 mysql 1 sudo apt-get autoremove --purge mysql-server-5.02 sudo apt-get remove mysql-server3 sudo apt-get autoremove mysql-server4 sudo apt-get remove mysql-common (非常重要) 上面的其

MySql基础学习-mysql安装

Linux环境下的安装 1检查是否已经安装 sudo service mysql start #若未安装,则提示: mysql: unrecognized service 2安装MySql #安装 MySQL 服务端.核心程序 sudo apt-get install mysql-server #安装 MySQL 客户端 sudo apt-get install mysql-client 安装过程中,提示确实yes即可,并且会提示设置root密码,设置即可. 3检查安装 sudo netstat

centos6.8 yum安装mysql 5.6

一.检查系统是否安装其他版本的MYSQL数据 yum list installed | grep mysql yum -y remove mysql-libs.x86_64 二.安装及配置 wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm rpm -ivh mysql-community-release-el6-5.noarch.rpm yum repolist all | grep mysql 安装MYSQL

Linux安装mysql——源码安装

1.假设已经有mysql-5.5.10.tar.gz以及cmake-2.8.4.tar.gz两个源文件 (1)先安装cmake(mysql5.5以后是通过cmake来编译的) [[email protected] rhel5 local]#tar -zxv -f cmake-2.8.4.tar.gz[[email protected] rhel5 local]#cd cmake-2.8.4[[email protected] rhel5 cmake-2.8.4]#./configure[[ema

Centos使用yum安装mysql

Centos下使用yum安装mysql客户端.服务器端,以及启动.登录和远程访问.  1.安装 查看有没有安装过: yum list installed mysql* rpm -qa | grep mysql* 查看有没有安装包: yum list mysql* 安装mysql客户端: yum install mysql 安装mysql 服务器端: yum install mysql-server yum install mysql-devel 2.启动&&停止 数据库字符集设置 mysq

yum命令安装mysql

linux下使用yum安装mysql,以及启动.登录和远程访问. 1.安装 查看有没有安装过: yum list installed mysql* rpm -qa | grep mysql* 查看有没有安装包: yum list mysql* 安装mysql客户端: yum install mysql 安装mysql 服务器端: yum install mysql-server yum install mysql-devel 2.启动&&停止 数据库字符集设置 mysql配置文件/etc/

Linux操作系统上安装Mysql数据库

安装查看有没有安装过: yum list installed mysql* rpm -qa|grep mysql* 查看有没有安装包: yum list mysql* 安装mysql客户端: yum install mysql 安装mysql 服务器端: yum install mysql-server yum install mysql-devel 启动&&停止 数据库字符集设置 mysql配置文件/etc/my.cnf中加入default-character-set=utf8 启动my

linux下使用yum安装mysql详解

本人博客上一篇(http://blog.csdn.net/tjcyjd/article/details/41646889)已讲了yum源的配置,有了yum那么安装mysql就会很简单,具体如下: 1.安装客户端和服务器端 确认mysql是否已安装: yum list installed mysql* rpm -qa | grep mysql* 查看是否有安装包: yum list mysql* 安装mysql客户端: yum install mysql 安装mysql 服务器端: yum ins

在Ubuntu上使用apt-get安装MySQL+安全优化

0.说明 使用apt-get安装的好处是,你不用自己去解决软件之间的依赖问题,基本上apt执行完成,也就把软件安装好了,下面介绍使用apt的方法来安装MySQL,同时也会介绍安装完成后的安全优化. 注意:下面的操作都是以新安装的Ubuntu 15.10来作为演示的. 1.使用apt安装MySQL 安装MySQL数据库: 注意:在安装过程中会几次要求你设置MySQL数据库的管理员用户密码,我们这里先不设置.(出现要求设置的页面时直接按"确定"即可.) [email protected]:

linux 下配置mysql区分大小写(不区分可能出现找不到表的情况)怎么样使用yum来安装mysql

Linux 默认情况下,数据库是区分大小写的:因此,要将mysql设置成不区分大小写 在my.cof 设置 lower_case_table_names=1(1忽略大小写,0区分大小写) 检查方式:在mysql控制台中输入如下命令 show variables like 'lower%'; linux下查找mysql安装路径: whereis mysql yum 安装mysql: linux下使用yum安装mysql,以及启动.登录和远程访问. 1.安装 查看有没有安装过: yum list i