zoukankan      html  css  js  c++  java
  • mysql主从之Mysql_mysql基本安装

    下载安装包:

    https://dev.mysql.com/downloads/mysql/5.7.html#downloads

    [root@jenkins-master ~]# cd /usr/local/src/

    [root@jenkins-master src]# wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.26-1.el7.x86_64.rpm-bundle.tar

    查看旧版本mysql

     [root@jenkins-master src]# rpm -ivh *.rpm

    error: Failed dependencies:
        mariadb-libs is obsoleted by mysql-community-libs-5.7.26-1.el7.x86_64
        mariadb-libs is obsoleted by mysql-community-libs-compat-5.7.26-1.el7.x86_64
        perl(JSON) is needed by mysql-community-test-5.7.26-1.el7.x86_64

    [root@localhost src]# yum list mariadb-lib*

    [root@localhost src]# yum remove mariadb-lib*

    [root@localhost src]# yum -y install net-tools libaio

    数据库的初始化

    [root@localhost src]# yum -y install perl-Module-Install

    必须安装的包:common,server,libs,client

    [root@jenkins-master src]# tar -xvf mysql-5.7.26-1.el7.x86_64.rpm-bundle.tar 

    [root@localhost src]# ll

    根据提示安装

    [root@localhost src]# rpm -ivh mysql-community-client-5.7.26-1.el7.x86_64.rpm 
    warning: mysql-community-client-5.7.26-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
    error: Failed dependencies:
        mysql-community-libs(x86-64) >= 5.7.9 is needed by mysql-community-client-5.7.26-1.el7.x86_64
    [root@localhost src]# rpm -ivh mysql-community-libs-5.7.26-1.el7.x86_64.rpm 
    warning: mysql-community-libs-5.7.26-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
    error: Failed dependencies:
        mysql-community-common(x86-64) >= 5.7.9 is needed by mysql-community-libs-5.7.26-1.el7.x86_64
    [root@localhost src]# rpm -ivh mysql-community-common-5.7.26-1.el7.x86_64.rpm
    warning: mysql-community-common-5.7.26-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
    Preparing...                          ################################# [100%]
    Updating / installing...
       1:mysql-community-common-5.7.26-1.e################################# [100%]
    [root@localhost src]# rpm -ivh mysql-community-client-5.7.26-1.el7.x86_64.rpm 
    warning: mysql-community-client-5.7.26-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
    error: Failed dependencies:
        mysql-community-libs(x86-64) >= 5.7.9 is needed by mysql-community-client-5.7.26-1.el7.x86_64
    [root@localhost src]# rpm -ivh mysql-community-libs-5.7.26-1.el7.x86_64.rpm 
    warning: mysql-community-libs-5.7.26-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
    Preparing...                          ################################# [100%]
    Updating / installing...
       1:mysql-community-libs-5.7.26-1.el7################################# [100%]
    [root@localhost src]# rpm -ivh mysql-community-client-5.7.26-1.el7.x86_64.rpm 
    warning: mysql-community-client-5.7.26-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
    Preparing...                          ################################# [100%]
    Updating / installing...
       1:mysql-community-client-5.7.26-1.e################################# [100%]
    [root@localhost src]# mysql --version
    mysql  Ver 14.14 Distrib 5.7.26, for Linux (x86_64) using  EditLine wrapper  #版本是5.7.26

     安装其他两个包,按顺序装,否则可能报错,如果有报错,按照提示

    [root@localhost src]# rpm -ivh mysql-community-server-5.7.26-1.el7.x86_64.rpm

    [root@localhost src]# rpm -ivh mysql-community-devel-5.7.26-1.el7.x86_64.rpm 

    安装完成

    默认的数据目录在/var/lib/mysql

    [root@localhost src]# ll -d /var/lib/mysql
    drwxr-x--x. 2 mysql mysql 6 Apr 13 10:40 /var/lib/mysq

    作者:梦中泪
    关于作者:云计算,linux,虚拟化,存储

    ---------------------------------------------------------------------------

    个性签名:我以为我很颓废,今天我才知道,原来我早报废了。

    如果觉得本篇文章最您有帮助,欢迎转载,且在文章页面明显位置给出原文链接!记得在右下角点个“推荐”,博主在此感谢!

  • 相关阅读:
    线程安全
    Thread 的join方法
    守护线程和用户线程
    LinkedList封装
    System.arraycopy的测试
    ArrayList封装
    常用算法
    Java并发---concurrent包
    Java并发--三大性质
    Java并发--final关键字
  • 原文地址:https://www.cnblogs.com/zyxnhr/p/10778258.html
Copyright © 2011-2022 走看看