• MySQL.Linux.安装


    Linux 7.x.安装 MySQL

    环境:

      linux是安装在虚拟机中的,宿主机是:win10系统。安装MySQL的时候,首先需要网络是通的(宿主机和虚拟机之间通信)。相关配置,参见:虚拟机和宿主机通信 

      

    安装:

      查看Linux版本号:

        cat /etc/redhat-release 

        

      Linux版本号,如果是6.x ,参见:《Linux 6.x 安装MySQL

        执行指令:yum install -y mysql mysql-server mysql-devel

      Linux版本号,如果是7.x

        执行指令:yum groups install -y mariadb mariadb-client

      (yum groups install -y mariadb mariadb-server)

      执行上述命令,如果出现yum源问题,如下所示,需要进行配置yum源。参见:《Linux配置yum源

        yum源配置完成后,在此执行指令:yum groups install -y mariadb mariadb-client ,日志信息如下:

     1 [root@localhost yum.repos.d]# yum groups install mariadb mariadb-client -y
     2 Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
     3 This system is not registered with an entitlement server. You can use subscription-manager to register.
     4 There is no installed groups file.
     5 Maybe run: yum groups mark convert (see man yum)
     6 Resolving Dependencies
     7 --> Running transaction check
     8 ---> Package MySQL-python.x86_64 0:1.2.5-1.el7 will be installed
     9 ---> Package mariadb.x86_64 1:5.5.56-2.el7 will be installed
    10 ---> Package mariadb-server.x86_64 1:5.5.56-2.el7 will be installed
    11 --> Processing Dependency: perl-DBD-MySQL for package: 1:mariadb-server-5.5.56-2.el7.x86_64
    12 ---> Package mysql-connector-odbc.x86_64 0:5.2.5-6.el7 will be installed
    13 --> Processing Dependency: libodbc.so.2()(64bit) for package: mysql-connector-odbc-5.2.5-6.el7.x86_64
    14 --> Processing Dependency: libodbcinst.so.2()(64bit) for package: mysql-connector-odbc-5.2.5-6.el7.x86_64
    15 --> Running transaction check
    16 ---> Package perl-DBD-MySQL.x86_64 0:4.023-5.el7 will be installed
    17 ---> Package unixODBC.x86_64 0:2.3.1-11.el7 will be installed
    18 --> Finished Dependency Resolution
    19 
    20 Dependencies Resolved
    21 
    22 ==================================================================================================================================
    23  Package                                Arch                     Version                             Repository              Size
    24 ==================================================================================================================================
    25 Installing for group install "MariaDB Database Client":
    26  MySQL-python                           x86_64                   1.2.5-1.el7                         base                    90 k
    27  mariadb                                x86_64                   1:5.5.56-2.el7                      base                   9.1 M
    28  mysql-connector-odbc                   x86_64                   5.2.5-6.el7                         base                   146 k
    29 Installing for group install "MariaDB Database Server":
    30  mariadb-server                         x86_64                   1:5.5.56-2.el7                      base                    11 M
    31 Installing for dependencies:
    32  perl-DBD-MySQL                         x86_64                   4.023-5.el7                         base                   140 k
    33  unixODBC                               x86_64                   2.3.1-11.el7                        base                   413 k
    34 
    35 Transaction Summary
    36 ==================================================================================================================================
    37 Install  4 Packages (+2 Dependent packages)
    38 
    39 Total download size: 21 M
    40 Installed size: 109 M
    41 Downloading packages:
    42 ----------------------------------------------------------------------------------------------------------------------------------
    43 Total                                                                                              45 MB/s |  21 MB  00:00:00     
    44 Running transaction check
    45 Running transaction test
    46 Transaction test succeeded
    47 Running transaction
    48   Installing : 1:mariadb-5.5.56-2.el7.x86_64                                                                                  1/6 
    49   Installing : perl-DBD-MySQL-4.023-5.el7.x86_64                                                                              2/6 
    50   Installing : unixODBC-2.3.1-11.el7.x86_64                                                                                   3/6 
    51   Installing : mysql-connector-odbc-5.2.5-6.el7.x86_64                                                                        4/6 
    52   Installing : 1:mariadb-server-5.5.56-2.el7.x86_64                                                                           5/6 
    53   Installing : MySQL-python-1.2.5-1.el7.x86_64                                                                                6/6 
    54   Verifying  : mysql-connector-odbc-5.2.5-6.el7.x86_64                                                                        1/6 
    55   Verifying  : unixODBC-2.3.1-11.el7.x86_64                                                                                   2/6 
    56   Verifying  : MySQL-python-1.2.5-1.el7.x86_64                                                                                3/6 
    57   Verifying  : 1:mariadb-server-5.5.56-2.el7.x86_64                                                                           4/6 
    58   Verifying  : perl-DBD-MySQL-4.023-5.el7.x86_64                                                                              5/6 
    59   Verifying  : 1:mariadb-5.5.56-2.el7.x86_64                                                                                  6/6 
    60 
    61 Installed:
    62   MySQL-python.x86_64 0:1.2.5-1.el7               mariadb.x86_64 1:5.5.56-2.el7       mariadb-server.x86_64 1:5.5.56-2.el7      
    63   mysql-connector-odbc.x86_64 0:5.2.5-6.el7      
    64 
    65 Dependency Installed:
    66   perl-DBD-MySQL.x86_64 0:4.023-5.el7                                unixODBC.x86_64 0:2.3.1-11.el7                               
    67 
    68 Complete!
    69 [root@localhost yum.repos.d]# 

    看到 Complete ,说明安装成功。

    如有问题,欢迎纠正!!!

    如有转载,请标明源处:https://www.cnblogs.com/Charles-Yuan/p/9786424.html

  • 相关阅读:
    shiro (java安全框架)
    day13
    自己修改select的样式(修改select右边的小三角)
    如何让2个并列的div根据内容自动保持同等高度
    js定时显示广告代码
    jquery 模块拖拽
    JS获取浏览器可视区域尺寸
    jQuery事件绑定的最佳实践
    flot图插件使用
    计算json的和
  • 原文地址:https://www.cnblogs.com/Charles-Yuan/p/9786424.html
Copyright © 2020-2023  润新知