当前位置:   article > 正文

【mysql日常】Centos安装Mysql客户端

centos安装mysql客户端

一、判断是否已安装MYSQL

which mysql
which mysqldump
输出如下内容表示未安装

[root@qbi-executor-01 mysql]# which mysql

在这里插入图片描述

[root@qbi-executor-01 mysql]# which mysqldump

在这里插入图片描述

输入如下内容表示已安装

[root@centos6 ~]# which mysql

/usr/bin/mysql
  • 1

[root@centos6 ~]# which mysqldump

/usr/bin/mysqldump
  • 1

二、安装mysql客户端

[root@qbi-executor-01 mysql]# yum install mysql-community-server --nogpgcheck

 [root@qbi-executor-01 mysql]# yum install mysql-community-server --nogpgcheck
Loaded plugins: fastestmirror, langpacks, releasever-adapter, update-motd
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package mysql-community-server.x86_64 0:5.7.38-1.el7 will be installed
--> Processing Dependency: mysql-community-common(x86-64) = 5.7.38-1.el7 for package: mysql-community-server-5.7.38-1.el7.x86_64
--> Processing Dependency: mysql-community-client(x86-64) >= 5.7.9 for package: mysql-community-server-5.7.38-1.el7.x86_64
--> Running transaction check
---> Package mysql-community-client.x86_64 0:5.7.38-1.el7 will be installed
--> Processing Dependency: mysql-community-libs(x86-64) >= 5.7.9 for package: mysql-community-client-5.7.38-1.el7.x86_64
---> Package mysql-community-common.x86_64 0:5.7.38-1.el7 will be installed
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.68-1.1.al7 will be obsoleted
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-9.1.al7.x86_64
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-9.1.al7.x86_64
---> Package mysql-community-libs.x86_64 0:5.7.38-1.el7 will be obsoleting
--> Running transaction check
---> Package mysql-community-libs-compat.x86_64 0:5.7.38-1.el7 will be obsoleting
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                      Arch    Version          Repository          Size
================================================================================
Installing:
 mysql-community-libs         x86_64  5.7.38-1.el7     mysql57-community  2.6 M
     replacing  mariadb-libs.x86_64 1:5.5.68-1.1.al7
 mysql-community-libs-compat  x86_64  5.7.38-1.el7     mysql57-community  1.2 M
     replacing  mariadb-libs.x86_64 1:5.5.68-1.1.al7
 mysql-community-server       x86_64  5.7.38-1.el7     mysql57-community  178 M
Installing for dependencies:
 mysql-community-client       x86_64  5.7.38-1.el7     mysql57-community   28 M
 mysql-community-common       x86_64  5.7.38-1.el7     mysql57-community  311 k

Transaction Summary
================================================================================
Install  3 Packages (+2 Dependent packages)

Total size: 209 M
Total download size: 178 M
Is this ok [y/d/N]: y
Downloading packages:
mysql-community-server-5.7.38-1.el7.x86_64.rpm             | 178 MB   00:16
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
  Installing : mysql-community-common-5.7.38-1.el7.x86_64                   1/6
  Installing : mysql-community-libs-5.7.38-1.el7.x86_64                     2/6
  Installing : mysql-community-client-5.7.38-1.el7.x86_64                   3/6
  Installing : mysql-community-server-5.7.38-1.el7.x86_64                   4/6
  Installing : mysql-community-libs-compat-5.7.38-1.el7.x86_64              5/6
  Erasing    : 1:mariadb-libs-5.5.68-1.1.al7.x86_64                         6/6
  Verifying  : mysql-community-libs-compat-5.7.38-1.el7.x86_64              1/6
  Verifying  : mysql-community-client-5.7.38-1.el7.x86_64                   2/6
  Verifying  : mysql-community-server-5.7.38-1.el7.x86_64                   3/6
  Verifying  : mysql-community-common-5.7.38-1.el7.x86_64                   4/6
  Verifying  : mysql-community-libs-5.7.38-1.el7.x86_64                     5/6
  Verifying  : 1:mariadb-libs-5.5.68-1.1.al7.x86_64                         6/6

Installed:
  mysql-community-libs.x86_64 0:5.7.38-1.el7
  mysql-community-libs-compat.x86_64 0:5.7.38-1.el7
  mysql-community-server.x86_64 0:5.7.38-1.el7

Dependency Installed:
  mysql-community-client.x86_64 0:5.7.38-1.el7
  mysql-community-common.x86_64 0:5.7.38-1.el7

Replaced:
  mariadb-libs.x86_64 1:5.5.68-1.1.al7

Complete!
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76

测试

再次测试安装情况,步骤同(一、判断是否已安装MYSQL)
命令:which mysql
命令:which mysqldump
在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/217181
推荐阅读
相关标签
  

闽ICP备14008679号