美文网首页
install MariaDB & Transaction ch

install MariaDB & Transaction ch

作者: Minnakey | 来源:发表于2020-04-18 19:38 被阅读0次

    查看系统中是否已安装 MariaDB,mysql

    rpm -qa | grep -i mariadb
    rpm -qa | grep -i mysql
    yum -y remove 包名
    

    执行以下命令,在 /etc/yum.repos.d/ 下创建 MariaDB.repo 文件

    vi /etc/yum.repos.d/MariaDB.repo
    
    # MariaDB 10.4 CentOS repository list - created 2019-11-05 11:56 UTC
    # http://downloads.mariadb.org/mariadb/repositories/
    [mariadb]
    name = MariaDB
    baseurl = http://yum.mariadb.org/10.4/centos7-amd64
    gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
    gpgcheck=1
    

    执行以下命令,安装 MariaDB

    yum -y install MariaDB-client MariaDB-server
    
    Transaction check error:
      file /usr/share/mysql/charsets/Index.xml from install of MariaDB-common-10.4.12-1.el7.centos.x86_64 conflicts with file from package mysql-community-common-5.7.28-1.el7.x86_64
     .............
      file /usr/share/mysql/serbian/errmsg.sys from install of MariaDB-server-10.4.12-1.el7.centos.x86_64 conflicts with file from package mysql-community-common-5.7.28-1.el7.x86_64
      file /usr/share/mysql/slovak/errmsg.sys from install of MariaDB-server-10.4.12-1.el7.centos.x86_64 conflicts with file from package mysql-community-common-5.7.28-1.el7.x86_64
      file /usr/share/mysql/spanish/errmsg.sys from install of MariaDB-server-10.4.12-1.el7.centos.x86_64 conflicts with file from package mysql-community-common-5.7.28-1.el7.x86_64
      file /usr/share/mysql/swedish/errmsg.sys from install of MariaDB-server-10.4.12-1.el7.centos.x86_64 conflicts with file from package mysql-community-common-5.7.28-1.el7.x86_64
      file /usr/share/mysql/ukrainian/errmsg.sys from install of MariaDB-server-10.4.12-1.el7.centos.x86_64 conflicts with file from package mysql-community-common-5.7.28-1.el7.x86_64
      file /usr/share/mysql/errmsg-utf8.txt from install of MariaDB-server-10.4.12-1.el7.centos.x86_64 conflicts with file from package mysql-community-common-5.7.28-1.el7.x86_64
    
    错误概要
    -------------
    

    错误解决:

    [root@VM_12 ~]# rpm -e mysql-community-common-5.7.28-1.el7.x86_64
    错误:依赖检测失败:
        mysql-community-common(x86-64) >= 5.7.9 被 (已安裝) mysql-community-libs-5.7.28-1.el7.x86_64 需要
    [root@VM_12 ~]# rpm -e mysql-community-client-5.7.28-1.el7.x86_64
    [root@VM_12_4 ~]#  rpm -qa | grep -i mysql
    mysql-community-common-5.7.28-1.el7.x86_64
    mysql-community-libs-5.7.28-1.el7.x86_64
    [root@VM_12_4 ~]# yum -y remove mysql-community-common-5.7.28-1.el7.x86_64
    
    1. 执行以下命令,启动 MariaDB 服务。

      systemctl start mariadb
      
    2. 执行以下命令,设置 MariaDB 为开机自启动。

      systemctl enable mariadb
      
    3. 执行以下命令,验证 MariaDB 是否安装成功。

      mysql
      

    相关文章

      网友评论

          本文标题:install MariaDB & Transaction ch

          本文链接:https://www.haomeiwen.com/subject/lrrnvhtx.html