您的位置:68399皇家赌场 > 虚拟主机 > centos 六.九安装mysql的详实教程,centosmysql

centos 六.九安装mysql的详实教程,centosmysql

发布时间:2019-05-25 12:13编辑:虚拟主机浏览(107)

    centos 6.9安装mysql,centos6.9mysql

    一、确认mysql是或不是已设置,有上面包车型大巴代码可见

    [[email protected] zjl]# yum list installed mysql*
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Loading mirror speeds from cached hostfile
     * base: mirrors.zju.edu.cn
     * extras: mirrors.aliyun.com
     * updates: mirrors.aliyun.com
    Installed Packages
    MySQL-python.x86_64 1.2.3-0.3.c1.1.el6 @base                        
    mysql-libs.x86_64   5.1.73-8.el6_8     @anaconda-CentOS-201703281317.x86_64/6.9
    

    二、卸载已安装的mysql,提议使用yum命令,因为yum命令可以活动删除与mysql相关的注重;如若利用rpm命令,则还亟需手动去删除和mysql相关的文书,比较麻烦

    [[email protected] zjl]# yum remove MySQL-python.x86_64 mysql-libs.x86_64
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Setting up Remove Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package MySQL-python.x86_64 0:1.2.3-0.3.c1.1.el6 will be erased
    --> Processing Dependency: MySQL-python for package: cloudera-manager-agent-5.11.1-1.cm5111.p0.9.el6.x86_64
    ---> Package mysql-libs.x86_64 0:5.1.73-8.el6_8 will be erased
    --> Processing Dependency: libmysqlclient.so.16()(64bit) for package: 2:postfix-2.6.6-8.el6.x86_64
    --> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: 2:postfix-2.6.6-8.el6.x86_64
    --> Processing Dependency: mysql-libs for package: 2:postfix-2.6.6-8.el6.x86_64
    --> Running transaction check
    ---> Package cloudera-manager-agent.x86_64 0:5.11.1-1.cm5111.p0.9.el6 will be erased
    ---> Package postfix.x86_64 2:2.6.6-8.el6 will be erased
    --> Processing Dependency: /usr/sbin/sendmail for package: redhat-lsb-core-4.0-7.el6.centos.x86_64
    --> Processing Dependency: /usr/sbin/sendmail for package: cronie-1.4.4-16.el6_8.2.x86_64
    --> Running transaction check
    ---> Package cronie.x86_64 0:1.4.4-16.el6_8.2 will be erased
    --> Processing Dependency: cronie = 1.4.4-16.el6_8.2 for package: cronie-anacron-1.4.4-16.el6_8.2.x86_64
    ---> Package redhat-lsb-core.x86_64 0:4.0-7.el6.centos will be erased
    --> Processing Dependency: redhat-lsb-core(x86-64) = 4.0 for package: redhat-lsb-printing-4.0-7.el6.centos.x86_64
    --> Processing Dependency: redhat-lsb-core(x86-64) = 4.0-7.el6.centos for package: redhat-lsb-4.0-7.el6.centos.x86_64
    --> Processing Dependency: redhat-lsb-core(x86-64) = 4.0 for package: redhat-lsb-graphics-4.0-7.el6.centos.x86_64
    --> Running transaction check
    ---> Package cronie-anacron.x86_64 0:1.4.4-16.el6_8.2 will be erased
    ---> Package redhat-lsb.x86_64 0:4.0-7.el6.centos will be erased
    --> Processing Dependency: redhat-lsb(x86-64) = 4.0-7.el6.centos for package: redhat-lsb-compat-4.0-7.el6.centos.x86_64
    ---> Package redhat-lsb-graphics.x86_64 0:4.0-7.el6.centos will be erased
    ---> Package redhat-lsb-printing.x86_64 0:4.0-7.el6.centos will be erased
    --> Running transaction check
    ---> Package redhat-lsb-compat.x86_64 0:4.0-7.el6.centos will be erased
    --> Processing Dependency: /etc/cron.d for package: crontabs-1.10-33.el6.noarch
    --> Processing Dependency: /etc/cron.d for package: sysstat-9.0.4-33.el6.x86_64
    --> Restarting Dependency Resolution with new changes.
    --> Running transaction check
    ---> Package crontabs.noarch 0:1.10-33.el6 will be erased
    ---> Package sysstat.x86_64 0:9.0.4-33.el6 will be erased
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ====================================================================
     Package                Arch   Version                  Repository
                                                                   Size
    ====================================================================
    Removing:
     MySQL-python           x86_64 1.2.3-0.3.c1.1.el6       @base 246 k
     mysql-libs             x86_64 5.1.73-8.el6_8           @anaconda-CentOS-201703281317.x86_64/6.9
                                                                  4.0 M
    Removing for dependencies:
     cloudera-manager-agent x86_64 5.11.1-1.cm5111.p0.9.el6 @/cloudera-manager-agent-5.11.1-1.cm5111.p0.9.el6.x86_64
                                                                   71 M
     cronie                 x86_64 1.4.4-16.el6_8.2         @anaconda-CentOS-201703281317.x86_64/6.9
                                                                  174 k
     cronie-anacron         x86_64 1.4.4-16.el6_8.2         @anaconda-CentOS-201703281317.x86_64/6.9
                                                                   43 k
     crontabs               noarch 1.10-33.el6              @anaconda-CentOS-201703281317.x86_64/6.9
                                                                  2.4 k
     postfix                x86_64 2:2.6.6-8.el6            @anaconda-CentOS-201703281317.x86_64/6.9
                                                                  9.7 M
     redhat-lsb             x86_64 4.0-7.el6.centos         @anaconda-CentOS-201703281317.x86_64/6.9
                                                                  0.0  
     redhat-lsb-compat      x86_64 4.0-7.el6.centos         @anaconda-CentOS-201703281317.x86_64/6.9
                                                                  0.0  
     redhat-lsb-core        x86_64 4.0-7.el6.centos         @anaconda-CentOS-201703281317.x86_64/6.9
                                                                   22 k
     redhat-lsb-graphics    x86_64 4.0-7.el6.centos         @anaconda-CentOS-201703281317.x86_64/6.9
                                                                  0.0  
     redhat-lsb-printing    x86_64 4.0-7.el6.centos         @anaconda-CentOS-201703281317.x86_64/6.9
                                                                  0.0  
     sysstat                x86_64 9.0.4-33.el6             @anaconda-CentOS-201703281317.x86_64/6.9
                                                                  826 k
    
    Transaction Summary
    ====================================================================
    Remove       13 Package(s)
    
    Installed size: 86 M
    Is this ok [y/N]: y
    Downloading Packages:
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
    Warning: RPMDB altered outside of yum.
      Erasing    : redhat-lsb-compat-4.0-7.el6.centos.x86_64       1/13 
      Erasing    : redhat-lsb-4.0-7.el6.centos.x86_64              2/13 
      Erasing    : cloudera-manager-agent-5.11.1-1.cm5111.p0.9.    3/13 
    warning: /etc/cloudera-scm-agent/config.ini saved as /etc/cloudera-scm-agent/config.ini.rpmsave
      Erasing    : redhat-lsb-graphics-4.0-7.el6.centos.x86_64     4/13 
      Erasing    : redhat-lsb-printing-4.0-7.el6.centos.x86_64     5/13 
      Erasing    : redhat-lsb-core-4.0-7.el6.centos.x86_64         6/13 
    /var/tmp/rpm-tmp.jLbJUk: line 1: lsb_release: command not found
      Erasing    : MySQL-python-1.2.3-0.3.c1.1.el6.x86_64          7/13 
      Erasing    : sysstat-9.0.4-33.el6.x86_64                     8/13 
      Erasing    : crontabs-1.10-33.el6.noarch                     9/13 
      Erasing    : cronie-anacron-1.4.4-16.el6_8.2.x86_64         10/13 
      Erasing    : cronie-1.4.4-16.el6_8.2.x86_64                 11/13 
      Erasing    : 2:postfix-2.6.6-8.el6.x86_64                   12/13 
      Erasing    : mysql-libs-5.1.73-8.el6_8.x86_64               13/13 
      Verifying  : redhat-lsb-printing-4.0-7.el6.centos.x86_64     1/13 
      Verifying  : cronie-anacron-1.4.4-16.el6_8.2.x86_64          2/13 
      Verifying  : cronie-1.4.4-16.el6_8.2.x86_64                  3/13 
      Verifying  : 2:postfix-2.6.6-8.el6.x86_64                    4/13 
      Verifying  : redhat-lsb-4.0-7.el6.centos.x86_64              5/13 
      Verifying  : redhat-lsb-core-4.0-7.el6.centos.x86_64         6/13 
      Verifying  : cloudera-manager-agent-5.11.1-1.cm5111.p0.9.    7/13 
      Verifying  : crontabs-1.10-33.el6.noarch                     8/13 
      Verifying  : redhat-lsb-compat-4.0-7.el6.centos.x86_64       9/13 
      Verifying  : MySQL-python-1.2.3-0.3.c1.1.el6.x86_64         10/13 
      Verifying  : redhat-lsb-graphics-4.0-7.el6.centos.x86_64    11/13 
      Verifying  : sysstat-9.0.4-33.el6.x86_64                    12/13 
      Verifying  : mysql-libs-5.1.73-8.el6_8.x86_64               13/13 
    
    Removed:
      MySQL-python.x86_64 0:1.2.3-0.3.c1.1.el6                          
      mysql-libs.x86_64 0:5.1.73-8.el6_8                                
    
    Dependency Removed:
      cloudera-manager-agent.x86_64 0:5.11.1-1.cm5111.p0.9.el6          
      cronie.x86_64 0:1.4.4-16.el6_8.2                                  
      cronie-anacron.x86_64 0:1.4.4-16.el6_8.2                          
      crontabs.noarch 0:1.10-33.el6                                     
      postfix.x86_64 2:2.6.6-8.el6                                      
      redhat-lsb.x86_64 0:4.0-7.el6.centos                              
      redhat-lsb-compat.x86_64 0:4.0-7.el6.centos                       
      redhat-lsb-core.x86_64 0:4.0-7.el6.centos                         
      redhat-lsb-graphics.x86_64 0:4.0-7.el6.centos                     
      redhat-lsb-printing.x86_64 0:4.0-7.el6.centos                     
      sysstat.x86_64 0:9.0.4-33.el6                                     
    
    Complete!
    

    3、用whereis命令查找mysql相关的文本,因为步骤2用yum来卸载,所以mysql被清理得很深透;若是选取rpm将会很麻烦,有为数十分多的文件供给手动清除

    [[email protected] zjl]# whereis mysql
    mysql:
    

    四、查看系统中的mysql安装包

    [[email protected] zjl]# yum list mysql*
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Loading mirror speeds from cached hostfile
     * base: mirrors.zju.edu.cn
     * extras: mirrors.aliyun.com
     * updates: mirrors.aliyun.com
    Available Packages
    MySQL-python.x86_64                                                                                        1.2.3-0.3.c1.1.el6                                                                                base
    mysql.x86_64                                                                                               5.1.73-8.el6_8                                                                                    base
    mysql-bench.x86_64                                                                                         5.1.73-8.el6_8                                                                                    base
    mysql-connector-java.noarch                                                                                1:5.1.17-6.el6                                                                                    base
    mysql-connector-odbc.x86_64                                                                                5.1.5r1144-7.el6                                                                                  base
    mysql-devel.i686                                                                                           5.1.73-8.el6_8                                                                                    base
    mysql-devel.x86_64                                                                                         5.1.73-8.el6_8                                                                                    base
    mysql-embedded.i686                                                                                        5.1.73-8.el6_8                                                                                    base
    mysql-embedded.x86_64                                                                                      5.1.73-8.el6_8                                                                                    base
    mysql-embedded-devel.i686                                                                                  5.1.73-8.el6_8                                                                                    base
    mysql-embedded-devel.x86_64                                                                                5.1.73-8.el6_8                                                                                    base
    mysql-libs.i686                                                                                            5.1.73-8.el6_8                                                                                    base
    mysql-libs.x86_64                                                                                          5.1.73-8.el6_8                                                                                    base
    mysql-server.x86_64                                                                                        5.1.73-8.el6_8                                                                                    base
    mysql-test.x86_64                                                                                          5.1.73-8.el6_8                                                                                    base
    

    5、选择mysql-server来安装

    [[email protected] zjl]# yum install mysql-server
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Setting up Install Process
    Loading mirror speeds from cached hostfile
     * base: mirrors.zju.edu.cn
     * extras: mirrors.aliyun.com
     * updates: mirrors.aliyun.com
    Resolving Dependencies
    --> Running transaction check
    ---> Package mysql-server.x86_64 0:5.1.73-8.el6_8 will be installed
    --> Processing Dependency: mysql = 5.1.73-8.el6_8 for package: mysql-server-5.1.73-8.el6_8.x86_64
    --> Processing Dependency: perl-DBI for package: mysql-server-5.1.73-8.el6_8.x86_64
    --> Processing Dependency: perl-DBD-MySQL for package: mysql-server-5.1.73-8.el6_8.x86_64
    --> Processing Dependency: perl(DBI) for package: mysql-server-5.1.73-8.el6_8.x86_64
    --> Processing Dependency: libmysqlclient_r.so.16(libmysqlclient_16)(64bit) for package: mysql-server-5.1.73-8.el6_8.x86_64
    --> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: mysql-server-5.1.73-8.el6_8.x86_64
    --> Processing Dependency: libmysqlclient_r.so.16()(64bit) for package: mysql-server-5.1.73-8.el6_8.x86_64
    --> Processing Dependency: libmysqlclient.so.16()(64bit) for package: mysql-server-5.1.73-8.el6_8.x86_64
    --> Running transaction check
    ---> Package mysql.x86_64 0:5.1.73-8.el6_8 will be installed
    ---> Package mysql-libs.x86_64 0:5.1.73-8.el6_8 will be installed
    ---> Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be installed
    ---> Package perl-DBI.x86_64 0:1.609-4.el6 will be installed
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    =================================================================================================================================================================================================================
     Package                                                Arch                                           Version                                                Repository                                    Size
    =================================================================================================================================================================================================================
    Installing:
     mysql-server                                           x86_64                                         5.1.73-8.el6_8                                         base                                         8.6 M
    Installing for dependencies:
     mysql                                                  x86_64                                         5.1.73-8.el6_8                                         base                                         895 k
     mysql-libs                                             x86_64                                         5.1.73-8.el6_8                                         base                                         1.2 M
     perl-DBD-MySQL                                         x86_64                                         4.013-3.el6                                            base                                         134 k
     perl-DBI                                               x86_64                                         1.609-4.el6                                            base                                         705 k
    
    Transaction Summary
    =================================================================================================================================================================================================================
    Install       5 Package(s)
    
    Total download size: 12 M
    Installed size: 33 M
    Is this ok [y/N]: 
    

    6、选取y继续设置

    Is this ok [y/N]: y
    Downloading Packages:
    (1/5): mysql-5.1.73-8.el6_8.x86_64.rpm                                                                                                                                                    | 895 kB     00:00     
    (2/5): mysql-libs-5.1.73-8.el6_8.x86_64.rpm                                                                                                                                               | 1.2 MB     00:00     
    (3/5): mysql-server-5.1.73-8.el6_8.x86_64.rpm                                                                                                                                             | 8.6 MB     00:02     
    (4/5): perl-DBD-MySQL-4.013-3.el6.x86_64.rpm                                                                                                                                              | 134 kB     00:00     
    (5/5): perl-DBI-1.609-4.el6.x86_64.rpm                                                                                                                                                    | 705 kB     00:00     
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Total                                                                                                                                                                            2.2 MB/s |  12 MB     00:05     
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Installing : mysql-libs-5.1.73-8.el6_8.x86_64                                                                                                                                                              1/5 
      Installing : perl-DBI-1.609-4.el6.x86_64                                                                                                                                                                   2/5 
      Installing : perl-DBD-MySQL-4.013-3.el6.x86_64                                                                                                                                                             3/5 
      Installing : mysql-5.1.73-8.el6_8.x86_64                                                                                                                                                                   4/5 
      Installing : mysql-server-5.1.73-8.el6_8.x86_64                                                                                                                                                            5/5 
      Verifying  : perl-DBD-MySQL-4.013-3.el6.x86_64                                                                                                                                                             1/5 
      Verifying  : mysql-libs-5.1.73-8.el6_8.x86_64                                                                                                                                                              2/5 
      Verifying  : mysql-server-5.1.73-8.el6_8.x86_64                                                                                                                                                            3/5 
      Verifying  : mysql-5.1.73-8.el6_8.x86_64                                                                                                                                                                   4/5 
      Verifying  : perl-DBI-1.609-4.el6.x86_64                                                                                                                                                                   5/5 
    
    Installed:
      mysql-server.x86_64 0:5.1.73-8.el6_8                                                                                                                                                                           
    
    Dependency Installed:
      mysql.x86_64 0:5.1.73-8.el6_8                    mysql-libs.x86_64 0:5.1.73-8.el6_8                    perl-DBD-MySQL.x86_64 0:4.013-3.el6                    perl-DBI.x86_64 0:1.609-4.el6                   
    
    Complete!
    

    7、启动mysql服务

    [[email protected] zjl]# service mysqld start
    Initializing MySQL database:  Installing MySQL system tables...
    OK
    Filling help tables...
    OK
    
    To start mysqld at boot time you have to copy
    support-files/mysql.server to the right place for your system
    
    PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
    To do so, start the server, then issue the following commands:
    
    /usr/bin/mysqladmin -u root password 'new-password'
    /usr/bin/mysqladmin -u root -h cdh1.zjl.com password 'new-password'
    
    Alternatively you can run:
    /usr/bin/mysql_secure_installation
    
    which will also give you the option of removing the test
    databases and anonymous user created by default.  This is
    strongly recommended for production servers.
    
    See the manual for more instructions.
    
    You can start the MySQL daemon with:
    cd /usr ; /usr/bin/mysqld_safe &
    
    You can test the MySQL daemon with mysql-test-run.pl
    cd /usr/mysql-test ; perl mysql-test-run.pl
    
    Please report any problems with the /usr/bin/mysqlbug script!
    
                                                               [  OK  ]
    Starting mysqld:                                           [  OK  ]
    

    八、连接一下试一下,直接mysql然后q关闭连接

    [[email protected] zjl]# mysql
    Welcome to the MySQL monitor.  Commands end with ; or g.
    Your MySQL connection id is 2
    Server version: 5.1.73 Source distribution
    
    Copyright (c) 2000, 2013, 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> q
    Bye
    

    玖、设置mysql开机运营

    [[email protected] zjl]# chkconfig mysqld on
    

    10、开启3306端口,并保存

    [[email protected] zjl]# /sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT
    [[email protected] zjl]# /etc/rc.d/init.d/iptables save
    

    1一、连接mysql设置密码

    [[email protected] zjl]# mysql
    Welcome to the MySQL monitor.  Commands end with ; or g.
    Your MySQL connection id is 3
    Server version: 5.1.73 Source distribution
    
    Copyright (c) 2000, 2013, 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> use mysql;
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    
    Database changed
    mysql> update user set password=password('123') where user='root';
    Query OK, 3 rows affected (0.02 sec)
    Rows matched: 3  Changed: 3  Warnings: 0
    
    mysql> flush privileges;
    Query OK, 0 rows affected (0.02 sec)
    
    mysql> q
    Bye
    

    12、重启mysql服务

    [[email protected] zjl]# service mysqld restart
    Stopping mysqld:                                           [  OK  ]
    Starting mysqld:                                           [  OK  ]
    

    澳门皇家赌场55533网址, 

    六.玖安装mysql,centos陆.玖mysql 壹、确认mysql是或不是已设置,有上边包车型地铁代码可见 [[email protected] zjl]# yum list installed mysql* Loaded plugins: fastestmirror, refresh -...

    centos 陆.玖安装mysql的事无巨细教程,centosmysql

    壹、确认mysql是或不是已安装,有下边包车型地铁代码可见

    [[email protected] zjl]# yum list installed mysql*
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Loading mirror speeds from cached hostfile
     * base: mirrors.zju.edu.cn
     * extras: mirrors.aliyun.com
     * updates: mirrors.aliyun.com
    Installed Packages
    MySQL-python.x86_64 1.2.3-0.3.c1.1.el6 @base      
    mysql-libs.x86_64 5.1.73-8.el6_8  @anaconda-CentOS-201703281317.x86_64/6.9
    

    二、卸载已安装的mysql,提出使用yum命令,因为yum命令可以活动删除与mysql相关的信赖;假如利用rpm命令,则还需求手动去删除和mysql相关的文书,比较困苦

    [[email protected] zjl]# yum remove MySQL-python.x86_64 mysql-libs.x86_64
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Setting up Remove Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package MySQL-python.x86_64 0:1.2.3-0.3.c1.1.el6 will be erased
    --> Processing Dependency: MySQL-python for package: cloudera-manager-agent-5.11.1-1.cm5111.p0.9.el6.x86_64
    ---> Package mysql-libs.x86_64 0:5.1.73-8.el6_8 will be erased
    --> Processing Dependency: libmysqlclient.so.16()(64bit) for package: 2:postfix-2.6.6-8.el6.x86_64
    --> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: 2:postfix-2.6.6-8.el6.x86_64
    --> Processing Dependency: mysql-libs for package: 2:postfix-2.6.6-8.el6.x86_64
    --> Running transaction check
    ---> Package cloudera-manager-agent.x86_64 0:5.11.1-1.cm5111.p0.9.el6 will be erased
    ---> Package postfix.x86_64 2:2.6.6-8.el6 will be erased
    --> Processing Dependency: /usr/sbin/sendmail for package: redhat-lsb-core-4.0-7.el6.centos.x86_64
    --> Processing Dependency: /usr/sbin/sendmail for package: cronie-1.4.4-16.el6_8.2.x86_64
    --> Running transaction check
    ---> Package cronie.x86_64 0:1.4.4-16.el6_8.2 will be erased
    --> Processing Dependency: cronie = 1.4.4-16.el6_8.2 for package: cronie-anacron-1.4.4-16.el6_8.2.x86_64
    ---> Package redhat-lsb-core.x86_64 0:4.0-7.el6.centos will be erased
    --> Processing Dependency: redhat-lsb-core(x86-64) = 4.0 for package: redhat-lsb-printing-4.0-7.el6.centos.x86_64
    --> Processing Dependency: redhat-lsb-core(x86-64) = 4.0-7.el6.centos for package: redhat-lsb-4.0-7.el6.centos.x86_64
    --> Processing Dependency: redhat-lsb-core(x86-64) = 4.0 for package: redhat-lsb-graphics-4.0-7.el6.centos.x86_64
    --> Running transaction check
    ---> Package cronie-anacron.x86_64 0:1.4.4-16.el6_8.2 will be erased
    ---> Package redhat-lsb.x86_64 0:4.0-7.el6.centos will be erased
    --> Processing Dependency: redhat-lsb(x86-64) = 4.0-7.el6.centos for package: redhat-lsb-compat-4.0-7.el6.centos.x86_64
    ---> Package redhat-lsb-graphics.x86_64 0:4.0-7.el6.centos will be erased
    ---> Package redhat-lsb-printing.x86_64 0:4.0-7.el6.centos will be erased
    --> Running transaction check
    ---> Package redhat-lsb-compat.x86_64 0:4.0-7.el6.centos will be erased
    --> Processing Dependency: /etc/cron.d for package: crontabs-1.10-33.el6.noarch
    --> Processing Dependency: /etc/cron.d for package: sysstat-9.0.4-33.el6.x86_64
    --> Restarting Dependency Resolution with new changes.
    --> Running transaction check
    ---> Package crontabs.noarch 0:1.10-33.el6 will be erased
    ---> Package sysstat.x86_64 0:9.0.4-33.el6 will be erased
    --> Finished Dependency Resolution
    Dependencies Resolved
    ====================================================================
     Package    Arch Version     Repository
                    Size
    ====================================================================
    Removing:
     MySQL-python   x86_64 1.2.3-0.3.c1.1.el6  @base 246 k
     mysql-libs    x86_64 5.1.73-8.el6_8   @anaconda-CentOS-201703281317.x86_64/6.9
                    4.0 M
    Removing for dependencies:
     cloudera-manager-agent x86_64 5.11.1-1.cm5111.p0.9.el6 @/cloudera-manager-agent-5.11.1-1.cm5111.p0.9.el6.x86_64
                    71 M
     cronie     x86_64 1.4.4-16.el6_8.2   @anaconda-CentOS-201703281317.x86_64/6.9
                    174 k
     cronie-anacron   x86_64 1.4.4-16.el6_8.2   @anaconda-CentOS-201703281317.x86_64/6.9
                    43 k
     crontabs    noarch 1.10-33.el6    @anaconda-CentOS-201703281317.x86_64/6.9
                    2.4 k
     postfix    x86_64 2:2.6.6-8.el6   @anaconda-CentOS-201703281317.x86_64/6.9
                    9.7 M
     redhat-lsb    x86_64 4.0-7.el6.centos   @anaconda-CentOS-201703281317.x86_64/6.9
                    0.0 
     redhat-lsb-compat  x86_64 4.0-7.el6.centos   @anaconda-CentOS-201703281317.x86_64/6.9
                    0.0 
     redhat-lsb-core  x86_64 4.0-7.el6.centos   @anaconda-CentOS-201703281317.x86_64/6.9
                    22 k
     redhat-lsb-graphics x86_64 4.0-7.el6.centos   @anaconda-CentOS-201703281317.x86_64/6.9
                    0.0 
     redhat-lsb-printing x86_64 4.0-7.el6.centos   @anaconda-CentOS-201703281317.x86_64/6.9
                    0.0 
     sysstat    x86_64 9.0.4-33.el6    @anaconda-CentOS-201703281317.x86_64/6.9
                    826 k
    Transaction Summary
    ====================================================================
    Remove  13 Package(s)
    Installed size: 86 M
    Is this ok [y/N]: y
    Downloading Packages:
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
    Warning: RPMDB altered outside of yum.
     Erasing : redhat-lsb-compat-4.0-7.el6.centos.x86_64  1/13 
     Erasing : redhat-lsb-4.0-7.el6.centos.x86_64    2/13 
     Erasing : cloudera-manager-agent-5.11.1-1.cm5111.p0.9. 3/13 
    warning: /etc/cloudera-scm-agent/config.ini saved as /etc/cloudera-scm-agent/config.ini.rpmsave
     Erasing : redhat-lsb-graphics-4.0-7.el6.centos.x86_64  4/13 
     Erasing : redhat-lsb-printing-4.0-7.el6.centos.x86_64  5/13 
     Erasing : redhat-lsb-core-4.0-7.el6.centos.x86_64   6/13 
    /var/tmp/rpm-tmp.jLbJUk: line 1: lsb_release: command not found
     Erasing : MySQL-python-1.2.3-0.3.c1.1.el6.x86_64   7/13 
     Erasing : sysstat-9.0.4-33.el6.x86_64      8/13 
     Erasing : crontabs-1.10-33.el6.noarch      9/13 
     Erasing : cronie-anacron-1.4.4-16.el6_8.2.x86_64   10/13 
     Erasing : cronie-1.4.4-16.el6_8.2.x86_64     11/13 
     Erasing : 2:postfix-2.6.6-8.el6.x86_64     12/13 
     Erasing : mysql-libs-5.1.73-8.el6_8.x86_64    13/13 
     Verifying : redhat-lsb-printing-4.0-7.el6.centos.x86_64  1/13 
     Verifying : cronie-anacron-1.4.4-16.el6_8.2.x86_64   2/13 
     Verifying : cronie-1.4.4-16.el6_8.2.x86_64     3/13 
     Verifying : 2:postfix-2.6.6-8.el6.x86_64     4/13 
     Verifying : redhat-lsb-4.0-7.el6.centos.x86_64    5/13 
     Verifying : redhat-lsb-core-4.0-7.el6.centos.x86_64   6/13 
     Verifying : cloudera-manager-agent-5.11.1-1.cm5111.p0.9. 7/13 
     Verifying : crontabs-1.10-33.el6.noarch      8/13 
     Verifying : redhat-lsb-compat-4.0-7.el6.centos.x86_64  9/13 
     Verifying : MySQL-python-1.2.3-0.3.c1.1.el6.x86_64   10/13 
     Verifying : redhat-lsb-graphics-4.0-7.el6.centos.x86_64 11/13 
     Verifying : sysstat-9.0.4-33.el6.x86_64     12/13 
     Verifying : mysql-libs-5.1.73-8.el6_8.x86_64    13/13 
    Removed:
     MySQL-python.x86_64 0:1.2.3-0.3.c1.1.el6       
     mysql-libs.x86_64 0:5.1.73-8.el6_8        
    Dependency Removed:
     cloudera-manager-agent.x86_64 0:5.11.1-1.cm5111.p0.9.el6   
     cronie.x86_64 0:1.4.4-16.el6_8.2         
     cronie-anacron.x86_64 0:1.4.4-16.el6_8.2       
     crontabs.noarch 0:1.10-33.el6          
     postfix.x86_64 2:2.6.6-8.el6          
     redhat-lsb.x86_64 0:4.0-7.el6.centos        
     redhat-lsb-compat.x86_64 0:4.0-7.el6.centos      
     redhat-lsb-core.x86_64 0:4.0-7.el6.centos       
     redhat-lsb-graphics.x86_64 0:4.0-7.el6.centos      
     redhat-lsb-printing.x86_64 0:4.0-7.el6.centos      
     sysstat.x86_64 0:9.0.4-33.el6          
    Complete!
    

    三、用whereis命令查找mysql相关的文本,因为步骤2用yum来卸载,所以mysql被清理得很通透到底;要是采纳rpm将会很麻烦,有过多的文件需求手动清除

    [[email protected] zjl]# whereis mysql
    mysql:
    

    四、查看系统中的mysql安装包

    [[email protected] zjl]# yum list mysql*
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Loading mirror speeds from cached hostfile
     * base: mirrors.zju.edu.cn
     * extras: mirrors.aliyun.com
     * updates: mirrors.aliyun.com
    Available Packages
    MySQL-python.x86_64                      1.2.3-0.3.c1.1.el6                    base
    mysql.x86_64                        5.1.73-8.el6_8                     base
    mysql-bench.x86_64                       5.1.73-8.el6_8                     base
    mysql-connector-java.noarch                    1:5.1.17-6.el6                     base
    mysql-connector-odbc.x86_64                    5.1.5r1144-7.el6                     base
    mysql-devel.i686                       5.1.73-8.el6_8                     base
    mysql-devel.x86_64                       5.1.73-8.el6_8                     base
    mysql-embedded.i686                      5.1.73-8.el6_8                     base
    mysql-embedded.x86_64                      5.1.73-8.el6_8                     base
    mysql-embedded-devel.i686                     5.1.73-8.el6_8                     base
    mysql-embedded-devel.x86_64                    5.1.73-8.el6_8                     base
    mysql-libs.i686                       5.1.73-8.el6_8                     base
    mysql-libs.x86_64                       5.1.73-8.el6_8                     base
    mysql-server.x86_64                      5.1.73-8.el6_8                     base
    mysql-test.x86_64                       5.1.73-8.el6_8                     base
    

    5、选择mysql-server来安装

    [[email protected] zjl]# yum install mysql-server
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Setting up Install Process
    Loading mirror speeds from cached hostfile
     * base: mirrors.zju.edu.cn
     * extras: mirrors.aliyun.com
     * updates: mirrors.aliyun.com
    Resolving Dependencies
    --> Running transaction check
    ---> Package mysql-server.x86_64 0:5.1.73-8.el6_8 will be installed
    --> Processing Dependency: mysql = 5.1.73-8.el6_8 for package: mysql-server-5.1.73-8.el6_8.x86_64
    --> Processing Dependency: perl-DBI for package: mysql-server-5.1.73-8.el6_8.x86_64
    --> Processing Dependency: perl-DBD-MySQL for package: mysql-server-5.1.73-8.el6_8.x86_64
    --> Processing Dependency: perl(DBI) for package: mysql-server-5.1.73-8.el6_8.x86_64
    --> Processing Dependency: libmysqlclient_r.so.16(libmysqlclient_16)(64bit) for package: mysql-server-5.1.73-8.el6_8.x86_64
    --> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: mysql-server-5.1.73-8.el6_8.x86_64
    --> Processing Dependency: libmysqlclient_r.so.16()(64bit) for package: mysql-server-5.1.73-8.el6_8.x86_64
    --> Processing Dependency: libmysqlclient.so.16()(64bit) for package: mysql-server-5.1.73-8.el6_8.x86_64
    --> Running transaction check
    ---> Package mysql.x86_64 0:5.1.73-8.el6_8 will be installed
    ---> Package mysql-libs.x86_64 0:5.1.73-8.el6_8 will be installed
    ---> Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be installed
    ---> Package perl-DBI.x86_64 0:1.609-4.el6 will be installed
    --> Finished Dependency Resolution
    Dependencies Resolved
    =================================================================================================================================================================================================================
     Package            Arch           Version            Repository         Size
    =================================================================================================================================================================================================================
    Installing:
     mysql-server           x86_64           5.1.73-8.el6_8           base           8.6 M
    Installing for dependencies:
     mysql             x86_64           5.1.73-8.el6_8           base           895 k
     mysql-libs            x86_64           5.1.73-8.el6_8           base           1.2 M
     perl-DBD-MySQL           x86_64           4.013-3.el6           base           134 k
     perl-DBI            x86_64           1.609-4.el6           base           705 k
    Transaction Summary
    =================================================================================================================================================================================================================
    Install  5 Package(s)
    Total download size: 12 M
    Installed size: 33 M
    Is this ok [y/N]:
    
    6、选择y继续安装
    
    Is this ok [y/N]: y
    Downloading Packages:
    (1/5): mysql-5.1.73-8.el6_8.x86_64.rpm                                     | 895 kB  00:00  
    (2/5): mysql-libs-5.1.73-8.el6_8.x86_64.rpm                                    | 1.2 MB  00:00  
    (3/5): mysql-server-5.1.73-8.el6_8.x86_64.rpm                                    | 8.6 MB  00:02  
    (4/5): perl-DBD-MySQL-4.013-3.el6.x86_64.rpm                                    | 134 kB  00:00  
    (5/5): perl-DBI-1.609-4.el6.x86_64.rpm                                     | 705 kB  00:00  
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Total                                           2.2 MB/s | 12 MB  00:05  
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
     Installing : mysql-libs-5.1.73-8.el6_8.x86_64                                        1/5 
     Installing : perl-DBI-1.609-4.el6.x86_64                                         2/5 
     Installing : perl-DBD-MySQL-4.013-3.el6.x86_64                                        3/5 
     Installing : mysql-5.1.73-8.el6_8.x86_64                                         4/5 
     Installing : mysql-server-5.1.73-8.el6_8.x86_64                                       5/5 
     Verifying : perl-DBD-MySQL-4.013-3.el6.x86_64                                        1/5 
     Verifying : mysql-libs-5.1.73-8.el6_8.x86_64                                        2/5 
     Verifying : mysql-server-5.1.73-8.el6_8.x86_64                                       3/5 
     Verifying : mysql-5.1.73-8.el6_8.x86_64                                         4/5 
     Verifying : perl-DBI-1.609-4.el6.x86_64                                         5/5 
    Installed:
     mysql-server.x86_64 0:5.1.73-8.el6_8                                           
    Dependency Installed:
     mysql.x86_64 0:5.1.73-8.el6_8     mysql-libs.x86_64 0:5.1.73-8.el6_8     perl-DBD-MySQL.x86_64 0:4.013-3.el6     perl-DBI.x86_64 0:1.609-4.el6     
    Complete!
    

    7、启动mysql服务

    [[email protected] zjl]# service mysqld start
    Initializing MySQL database: Installing MySQL system tables...
    OK
    Filling help tables...
    OK
    To start mysqld at boot time you have to copy
    support-files/mysql.server to the right place for your system
    PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
    To do so, start the server, then issue the following commands:
    /usr/bin/mysqladmin -u root password 'new-password'
    /usr/bin/mysqladmin -u root -h cdh1.zjl.com password 'new-password'
    Alternatively you can run:
    /usr/bin/mysql_secure_installation
    which will also give you the option of removing the test
    databases and anonymous user created by default. This is
    strongly recommended for production servers.
    See the manual for more instructions.
    You can start the MySQL daemon with:
    cd /usr ; /usr/bin/mysqld_safe &
    You can test the MySQL daemon with mysql-test-run.pl
    cd /usr/mysql-test ; perl mysql-test-run.pl
    Please report any problems with the /usr/bin/mysqlbug script!
                   [ OK ]
    Starting mysqld:           [ OK ]
    

    8、连接一下试一下,直接mysql然后q关闭连接

    [[email protected] zjl]# mysql
    Welcome to the MySQL monitor. Commands end with ; or g.
    Your MySQL connection id is 2
    Server version: 5.1.73 Source distribution
    Copyright (c) 2000, 2013, 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> q
    Bye
    

    九、设置mysql开机运维

    [[email protected] zjl]# chkconfig mysqld on
    

    10、开启3306端口,并保存

    [[email protected] zjl]# /sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT
    [[email protected] zjl]# /etc/rc.d/init.d/iptables save
    

    1一、连接mysql设置密码

    [[email protected] zjl]# mysql
    Welcome to the MySQL monitor. Commands end with ; or g.
    Your MySQL connection id is 3
    Server version: 5.1.73 Source distribution
    Copyright (c) 2000, 2013, 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> use mysql;
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    Database changed
    mysql> update user set password=password('123') where user='root';
    Query OK, 3 rows affected (0.02 sec)
    Rows matched: 3 Changed: 3 Warnings: 0
    mysql> flush privileges;
    Query OK, 0 rows affected (0.02 sec)
    mysql> q
    Bye
    

    12、重启mysql服务

    [[email protected] zjl]# service mysqld restart
    Stopping mysqld:           [ OK ]
    Starting mysqld:           [ OK ]
    

    如上所述是作者给我们介绍的centos 六.九安装mysql的详细教程,希望对我们持有援助,借使大家有其它疑问请给本身留言,作者会及时回复大家的。在此也特别多谢大家对帮客之家网址的支撑!

    六.玖安装mysql的事无巨细教程,centosmysql 一、确认mysql是不是已安装,有上边包车型客车代码可见 [[email protected] zjl]# yum list installed mysql*Loaded plugins: fastestmirror...

    1、确认mysql是还是不是已设置,有上面包车型客车代码可见

    一、确认mysql是还是不是已安装,有上面包车型客车代码可见

    [root@cdh1 zjl]# yum list installed mysql*
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Loading mirror speeds from cached hostfile
     * base: mirrors.zju.edu.cn
     * extras: mirrors.aliyun.com
     * updates: mirrors.aliyun.com
    Installed Packages
    MySQL-python.x86_64 1.2.3-0.3.c1.1.el6 @base      
    mysql-libs.x86_64 5.1.73-8.el6_8  @anaconda-CentOS-201703281317.x86_64/6.9
    
    [root@cdh1 zjl]# yum list installed mysql*
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Loading mirror speeds from cached hostfile
     * base: mirrors.zju.edu.cn
     * extras: mirrors.aliyun.com
     * updates: mirrors.aliyun.com
    Installed Packages
    MySQL-python.x86_64 1.2.3-0.3.c1.1.el6 @base                        
    mysql-libs.x86_64   5.1.73-8.el6_8     @anaconda-CentOS-201703281317.x86_64/6.9
    

    二、卸载已安装的mysql,建议使用yum命令,因为yum命令能够自动删除与mysql相关的正视;即使运用rpm命令,则还亟需手动去删除和mysql相关的文书,比较麻烦

    贰、卸载已安装的mysql,提出使用yum命令,因为yum命令能够自行删除与mysql相关的借助;假如使用rpm命令,则还须求手动去删除和mysql相关的文书,相比较忙碌

    [root@cdh1 zjl]# yum remove MySQL-python.x86_64 mysql-libs.x86_64
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Setting up Remove Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package MySQL-python.x86_64 0:1.2.3-0.3.c1.1.el6 will be erased
    --> Processing Dependency: MySQL-python for package: cloudera-manager-agent-5.11.1-1.cm5111.p0.9.el6.x86_64
    ---> Package mysql-libs.x86_64 0:5.1.73-8.el6_8 will be erased
    --> Processing Dependency: libmysqlclient.so.16()(64bit) for package: 2:postfix-2.6.6-8.el6.x86_64
    --> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: 2:postfix-2.6.6-8.el6.x86_64
    --> Processing Dependency: mysql-libs for package: 2:postfix-2.6.6-8.el6.x86_64
    --> Running transaction check
    ---> Package cloudera-manager-agent.x86_64 0:5.11.1-1.cm5111.p0.9.el6 will be erased
    ---> Package postfix.x86_64 2:2.6.6-8.el6 will be erased
    --> Processing Dependency: /usr/sbin/sendmail for package: redhat-lsb-core-4.0-7.el6.centos.x86_64
    --> Processing Dependency: /usr/sbin/sendmail for package: cronie-1.4.4-16.el6_8.2.x86_64
    --> Running transaction check
    ---> Package cronie.x86_64 0:1.4.4-16.el6_8.2 will be erased
    --> Processing Dependency: cronie = 1.4.4-16.el6_8.2 for package: cronie-anacron-1.4.4-16.el6_8.2.x86_64
    ---> Package redhat-lsb-core.x86_64 0:4.0-7.el6.centos will be erased
    --> Processing Dependency: redhat-lsb-core(x86-64) = 4.0 for package: redhat-lsb-printing-4.0-7.el6.centos.x86_64
    --> Processing Dependency: redhat-lsb-core(x86-64) = 4.0-7.el6.centos for package: redhat-lsb-4.0-7.el6.centos.x86_64
    --> Processing Dependency: redhat-lsb-core(x86-64) = 4.0 for package: redhat-lsb-graphics-4.0-7.el6.centos.x86_64
    --> Running transaction check
    ---> Package cronie-anacron.x86_64 0:1.4.4-16.el6_8.2 will be erased
    ---> Package redhat-lsb.x86_64 0:4.0-7.el6.centos will be erased
    --> Processing Dependency: redhat-lsb(x86-64) = 4.0-7.el6.centos for package: redhat-lsb-compat-4.0-7.el6.centos.x86_64
    ---> Package redhat-lsb-graphics.x86_64 0:4.0-7.el6.centos will be erased
    ---> Package redhat-lsb-printing.x86_64 0:4.0-7.el6.centos will be erased
    --> Running transaction check
    ---> Package redhat-lsb-compat.x86_64 0:4.0-7.el6.centos will be erased
    --> Processing Dependency: /etc/cron.d for package: crontabs-1.10-33.el6.noarch
    --> Processing Dependency: /etc/cron.d for package: sysstat-9.0.4-33.el6.x86_64
    --> Restarting Dependency Resolution with new changes.
    --> Running transaction check
    ---> Package crontabs.noarch 0:1.10-33.el6 will be erased
    ---> Package sysstat.x86_64 0:9.0.4-33.el6 will be erased
    --> Finished Dependency Resolution
    Dependencies Resolved
    ====================================================================
     Package    Arch Version     Repository
                    Size
    ====================================================================
    Removing:
     MySQL-python   x86_64 1.2.3-0.3.c1.1.el6  @base 246 k
     mysql-libs    x86_64 5.1.73-8.el6_8   @anaconda-CentOS-201703281317.x86_64/6.9
                    4.0 M
    Removing for dependencies:
     cloudera-manager-agent x86_64 5.11.1-1.cm5111.p0.9.el6 @/cloudera-manager-agent-5.11.1-1.cm5111.p0.9.el6.x86_64
                    71 M
     cronie     x86_64 1.4.4-16.el6_8.2   @anaconda-CentOS-201703281317.x86_64/6.9
                    174 k
     cronie-anacron   x86_64 1.4.4-16.el6_8.2   @anaconda-CentOS-201703281317.x86_64/6.9
                    43 k
     crontabs    noarch 1.10-33.el6    @anaconda-CentOS-201703281317.x86_64/6.9
                    2.4 k
     postfix    x86_64 2:2.6.6-8.el6   @anaconda-CentOS-201703281317.x86_64/6.9
                    9.7 M
     redhat-lsb    x86_64 4.0-7.el6.centos   @anaconda-CentOS-201703281317.x86_64/6.9
                    0.0 
     redhat-lsb-compat  x86_64 4.0-7.el6.centos   @anaconda-CentOS-201703281317.x86_64/6.9
                    0.0 
     redhat-lsb-core  x86_64 4.0-7.el6.centos   @anaconda-CentOS-201703281317.x86_64/6.9
                    22 k
     redhat-lsb-graphics x86_64 4.0-7.el6.centos   @anaconda-CentOS-201703281317.x86_64/6.9
                    0.0 
     redhat-lsb-printing x86_64 4.0-7.el6.centos   @anaconda-CentOS-201703281317.x86_64/6.9
                    0.0 
     sysstat    x86_64 9.0.4-33.el6    @anaconda-CentOS-201703281317.x86_64/6.9
                    826 k
    Transaction Summary
    ====================================================================
    Remove  13 Package(s)
    Installed size: 86 M
    Is this ok [y/N]: y
    Downloading Packages:
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
    Warning: RPMDB altered outside of yum.
     Erasing : redhat-lsb-compat-4.0-7.el6.centos.x86_64  1/13 
     Erasing : redhat-lsb-4.0-7.el6.centos.x86_64    2/13 
     Erasing : cloudera-manager-agent-5.11.1-1.cm5111.p0.9. 3/13 
    warning: /etc/cloudera-scm-agent/config.ini saved as /etc/cloudera-scm-agent/config.ini.rpmsave
     Erasing : redhat-lsb-graphics-4.0-7.el6.centos.x86_64  4/13 
     Erasing : redhat-lsb-printing-4.0-7.el6.centos.x86_64  5/13 
     Erasing : redhat-lsb-core-4.0-7.el6.centos.x86_64   6/13 
    /var/tmp/rpm-tmp.jLbJUk: line 1: lsb_release: command not found
     Erasing : MySQL-python-1.2.3-0.3.c1.1.el6.x86_64   7/13 
     Erasing : sysstat-9.0.4-33.el6.x86_64      8/13 
     Erasing : crontabs-1.10-33.el6.noarch      9/13 
     Erasing : cronie-anacron-1.4.4-16.el6_8.2.x86_64   10/13 
     Erasing : cronie-1.4.4-16.el6_8.2.x86_64     11/13 
     Erasing : 2:postfix-2.6.6-8.el6.x86_64     12/13 
     Erasing : mysql-libs-5.1.73-8.el6_8.x86_64    13/13 
     Verifying : redhat-lsb-printing-4.0-7.el6.centos.x86_64  1/13 
     Verifying : cronie-anacron-1.4.4-16.el6_8.2.x86_64   2/13 
     Verifying : cronie-1.4.4-16.el6_8.2.x86_64     3/13 
     Verifying : 2:postfix-2.6.6-8.el6.x86_64     4/13 
     Verifying : redhat-lsb-4.0-7.el6.centos.x86_64    5/13 
     Verifying : redhat-lsb-core-4.0-7.el6.centos.x86_64   6/13 
     Verifying : cloudera-manager-agent-5.11.1-1.cm5111.p0.9. 7/13 
     Verifying : crontabs-1.10-33.el6.noarch      8/13 
     Verifying : redhat-lsb-compat-4.0-7.el6.centos.x86_64  9/13 
     Verifying : MySQL-python-1.2.3-0.3.c1.1.el6.x86_64   10/13 
     Verifying : redhat-lsb-graphics-4.0-7.el6.centos.x86_64 11/13 
     Verifying : sysstat-9.0.4-33.el6.x86_64     12/13 
     Verifying : mysql-libs-5.1.73-8.el6_8.x86_64    13/13 
    Removed:
     MySQL-python.x86_64 0:1.2.3-0.3.c1.1.el6       
     mysql-libs.x86_64 0:5.1.73-8.el6_8        
    Dependency Removed:
     cloudera-manager-agent.x86_64 0:5.11.1-1.cm5111.p0.9.el6   
     cronie.x86_64 0:1.4.4-16.el6_8.2         
     cronie-anacron.x86_64 0:1.4.4-16.el6_8.2       
     crontabs.noarch 0:1.10-33.el6          
     postfix.x86_64 2:2.6.6-8.el6          
     redhat-lsb.x86_64 0:4.0-7.el6.centos        
     redhat-lsb-compat.x86_64 0:4.0-7.el6.centos      
     redhat-lsb-core.x86_64 0:4.0-7.el6.centos       
     redhat-lsb-graphics.x86_64 0:4.0-7.el6.centos      
     redhat-lsb-printing.x86_64 0:4.0-7.el6.centos      
     sysstat.x86_64 0:9.0.4-33.el6          
    Complete!
    
    [root@cdh1 zjl]# yum remove MySQL-python.x86_64 mysql-libs.x86_64
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Setting up Remove Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package MySQL-python.x86_64 0:1.2.3-0.3.c1.1.el6 will be erased
    --> Processing Dependency: MySQL-python for package: cloudera-manager-agent-5.11.1-1.cm5111.p0.9.el6.x86_64
    ---> Package mysql-libs.x86_64 0:5.1.73-8.el6_8 will be erased
    --> Processing Dependency: libmysqlclient.so.16()(64bit) for package: 2:postfix-2.6.6-8.el6.x86_64
    --> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: 2:postfix-2.6.6-8.el6.x86_64
    --> Processing Dependency: mysql-libs for package: 2:postfix-2.6.6-8.el6.x86_64
    --> Running transaction check
    ---> Package cloudera-manager-agent.x86_64 0:5.11.1-1.cm5111.p0.9.el6 will be erased
    ---> Package postfix.x86_64 2:2.6.6-8.el6 will be erased
    --> Processing Dependency: /usr/sbin/sendmail for package: redhat-lsb-core-4.0-7.el6.centos.x86_64
    --> Processing Dependency: /usr/sbin/sendmail for package: cronie-1.4.4-16.el6_8.2.x86_64
    --> Running transaction check
    ---> Package cronie.x86_64 0:1.4.4-16.el6_8.2 will be erased
    --> Processing Dependency: cronie = 1.4.4-16.el6_8.2 for package: cronie-anacron-1.4.4-16.el6_8.2.x86_64
    ---> Package redhat-lsb-core.x86_64 0:4.0-7.el6.centos will be erased
    --> Processing Dependency: redhat-lsb-core(x86-64) = 4.0 for package: redhat-lsb-printing-4.0-7.el6.centos.x86_64
    --> Processing Dependency: redhat-lsb-core(x86-64) = 4.0-7.el6.centos for package: redhat-lsb-4.0-7.el6.centos.x86_64
    --> Processing Dependency: redhat-lsb-core(x86-64) = 4.0 for package: redhat-lsb-graphics-4.0-7.el6.centos.x86_64
    --> Running transaction check
    ---> Package cronie-anacron.x86_64 0:1.4.4-16.el6_8.2 will be erased
    ---> Package redhat-lsb.x86_64 0:4.0-7.el6.centos will be erased
    --> Processing Dependency: redhat-lsb(x86-64) = 4.0-7.el6.centos for package: redhat-lsb-compat-4.0-7.el6.centos.x86_64
    ---> Package redhat-lsb-graphics.x86_64 0:4.0-7.el6.centos will be erased
    ---> Package redhat-lsb-printing.x86_64 0:4.0-7.el6.centos will be erased
    --> Running transaction check
    ---> Package redhat-lsb-compat.x86_64 0:4.0-7.el6.centos will be erased
    --> Processing Dependency: /etc/cron.d for package: crontabs-1.10-33.el6.noarch
    --> Processing Dependency: /etc/cron.d for package: sysstat-9.0.4-33.el6.x86_64
    --> Restarting Dependency Resolution with new changes.
    --> Running transaction check
    ---> Package crontabs.noarch 0:1.10-33.el6 will be erased
    ---> Package sysstat.x86_64 0:9.0.4-33.el6 will be erased
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ====================================================================
     Package                Arch   Version                  Repository
                                                                   Size
    ====================================================================
    Removing:
     MySQL-python           x86_64 1.2.3-0.3.c1.1.el6       @base 246 k
     mysql-libs             x86_64 5.1.73-8.el6_8           @anaconda-CentOS-201703281317.x86_64/6.9
                                                                  4.0 M
    Removing for dependencies:
     cloudera-manager-agent x86_64 5.11.1-1.cm5111.p0.9.el6 @/cloudera-manager-agent-5.11.1-1.cm5111.p0.9.el6.x86_64
                                                                   71 M
     cronie                 x86_64 1.4.4-16.el6_8.2         @anaconda-CentOS-201703281317.x86_64/6.9
                                                                  174 k
     cronie-anacron         x86_64 1.4.4-16.el6_8.2         @anaconda-CentOS-201703281317.x86_64/6.9
                                                                   43 k
     crontabs               noarch 1.10-33.el6              @anaconda-CentOS-201703281317.x86_64/6.9
                                                                  2.4 k
     postfix                x86_64 2:2.6.6-8.el6            @anaconda-CentOS-201703281317.x86_64/6.9
                                                                  9.7 M
     redhat-lsb             x86_64 4.0-7.el6.centos         @anaconda-CentOS-201703281317.x86_64/6.9
                                                                  0.0  
     redhat-lsb-compat      x86_64 4.0-7.el6.centos         @anaconda-CentOS-201703281317.x86_64/6.9
                                                                  0.0  
     redhat-lsb-core        x86_64 4.0-7.el6.centos         @anaconda-CentOS-201703281317.x86_64/6.9
                                                                   22 k
     redhat-lsb-graphics    x86_64 4.0-7.el6.centos         @anaconda-CentOS-201703281317.x86_64/6.9
                                                                  0.0  
     redhat-lsb-printing    x86_64 4.0-7.el6.centos         @anaconda-CentOS-201703281317.x86_64/6.9
                                                                  0.0  
     sysstat                x86_64 9.0.4-33.el6             @anaconda-CentOS-201703281317.x86_64/6.9
                                                                  826 k
    
    Transaction Summary
    ====================================================================
    Remove       13 Package(s)
    
    Installed size: 86 M
    Is this ok [y/N]: y
    Downloading Packages:
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
    Warning: RPMDB altered outside of yum.
      Erasing    : redhat-lsb-compat-4.0-7.el6.centos.x86_64       1/13 
      Erasing    : redhat-lsb-4.0-7.el6.centos.x86_64              2/13 
      Erasing    : cloudera-manager-agent-5.11.1-1.cm5111.p0.9.    3/13 
    warning: /etc/cloudera-scm-agent/config.ini saved as /etc/cloudera-scm-agent/config.ini.rpmsave
      Erasing    : redhat-lsb-graphics-4.0-7.el6.centos.x86_64     4/13 
      Erasing    : redhat-lsb-printing-4.0-7.el6.centos.x86_64     5/13 
      Erasing    : redhat-lsb-core-4.0-7.el6.centos.x86_64         6/13 
    /var/tmp/rpm-tmp.jLbJUk: line 1: lsb_release: command not found
      Erasing    : MySQL-python-1.2.3-0.3.c1.1.el6.x86_64          7/13 
      Erasing    : sysstat-9.0.4-33.el6.x86_64                     8/13 
      Erasing    : crontabs-1.10-33.el6.noarch                     9/13 
      Erasing    : cronie-anacron-1.4.4-16.el6_8.2.x86_64         10/13 
      Erasing    : cronie-1.4.4-16.el6_8.2.x86_64                 11/13 
      Erasing    : 2:postfix-2.6.6-8.el6.x86_64                   12/13 
      Erasing    : mysql-libs-5.1.73-8.el6_8.x86_64               13/13 
      Verifying  : redhat-lsb-printing-4.0-7.el6.centos.x86_64     1/13 
      Verifying  : cronie-anacron-1.4.4-16.el6_8.2.x86_64          2/13 
      Verifying  : cronie-1.4.4-16.el6_8.2.x86_64                  3/13 
      Verifying  : 2:postfix-2.6.6-8.el6.x86_64                    4/13 
      Verifying  : redhat-lsb-4.0-7.el6.centos.x86_64              5/13 
      Verifying  : redhat-lsb-core-4.0-7.el6.centos.x86_64         6/13 
      Verifying  : cloudera-manager-agent-5.11.1-1.cm5111.p0.9.    7/13 
      Verifying  : crontabs-1.10-33.el6.noarch                     8/13 
      Verifying  : redhat-lsb-compat-4.0-7.el6.centos.x86_64       9/13 
      Verifying  : MySQL-python-1.2.3-0.3.c1.1.el6.x86_64         10/13 
      Verifying  : redhat-lsb-graphics-4.0-7.el6.centos.x86_64    11/13 
      Verifying  : sysstat-9.0.4-33.el6.x86_64                    12/13 
      Verifying  : mysql-libs-5.1.73-8.el6_8.x86_64               13/13 
    
    Removed:
      MySQL-python.x86_64 0:1.2.3-0.3.c1.1.el6                          
      mysql-libs.x86_64 0:5.1.73-8.el6_8                                
    
    Dependency Removed:
      cloudera-manager-agent.x86_64 0:5.11.1-1.cm5111.p0.9.el6          
      cronie.x86_64 0:1.4.4-16.el6_8.2                                  
      cronie-anacron.x86_64 0:1.4.4-16.el6_8.2                          
      crontabs.noarch 0:1.10-33.el6                                     
      postfix.x86_64 2:2.6.6-8.el6                                      
      redhat-lsb.x86_64 0:4.0-7.el6.centos                              
      redhat-lsb-compat.x86_64 0:4.0-7.el6.centos                       
      redhat-lsb-core.x86_64 0:4.0-7.el6.centos                         
      redhat-lsb-graphics.x86_64 0:4.0-7.el6.centos                     
      redhat-lsb-printing.x86_64 0:4.0-7.el6.centos                     
      sysstat.x86_64 0:9.0.4-33.el6                                     
    
    Complete!
    

    叁、用whereis命令查找mysql相关的文书,因为步骤二用yum来卸载,所以mysql被清理得很彻底;若是应用rpm将会很劳顿,有许多的公文要求手动清除

    叁、用whereis命令查找mysql相关的文件,因为步骤二用yum来卸载,所以mysql被清理得很干净;即便利用rpm将会很麻烦,有广大的公文供给手动清除

    [root@cdh1 zjl]# whereis mysql
    mysql:
    
    [root@cdh1 zjl]# whereis mysql
    mysql:
    

    四、查看系统中的mysql安装包

    肆、查看系统中的mysql安装包

    本文由68399皇家赌场发布于虚拟主机,转载请注明出处:centos 六.九安装mysql的详实教程,centosmysql

    关键词: 68399皇家赌场