zoukankan      html  css  js  c++  java
  • centos7使用yum安装mariaDB(开源MySQL)无法启动的解决办法


    ccfxue 2017-04-04 00:59:57 1170 收藏

    分类专栏: linux 文章标签: centos7 mariadb


    centos7内置的MySQL镜像已经放弃Oracle公司的MySQL,改用MySQL的分支数据库mariaDB,使用以下安装mariadb:

    [plain]  view plain  copy 
      在CODE上查看代码片 派生到我的代码片
    1. yum install mariadb*  

    然后使用命令systemctl start mariadb,提示如下:

    [plain]  view plain  copy 
      在CODE上查看代码片 派生到我的代码片
    1. Failed to start mariadb.service: Unit mariadb.service failed to load: No such file or directory  
    意思找不到mariadb这个服务。之所以找不到,是因为mariadb的安装本身就没有完成,执行以下命令,查看mariadb的依赖情况:

    [html]  view plain  copy 
      在CODE上查看代码片 派生到我的代码片
    1. $ sudo yum search mariadb  
    看到以下结果:

    执行以下,安装缺少的依赖包:

    [plain]  view plain  copy 
      在CODE上查看代码片 派生到我的代码片
    1. $ yum install mariadb-embedded mariadb-embedded-devel mariadb-libs mariadb-bench mariadb mariadb-server  
    然后再启动mariadb,正常,如果要设置开机自启动mariadb,使用以下命令:

    [plain]  view plain  copy 
      在CODE上查看代码片 派生到我的代码片
    1. $ systemctl enable mariadb  


    1. yum install mariadb* 

    然后使用命令systemctl start mariadb,提示如下:

    [plain]  view plain  copy 
      在CODE上查看代码片 派生到我的代码片
    1. Failed to start mariadb.service: Unit mariadb.service failed to load: No such file or directory 
    意思找不到mariadb这个服务。之所以找不到,是因为mariadb的安装本身就没有完成,执行以下命令,查看mariadb的依赖情况:

    [html]  view plain  copy 
      在CODE上查看代码片 派生到我的代码片
    1. $ sudo yum search mariadb 
    看到以下结果:

    执行以下,安装缺少的依赖包:

    [plain]  view plain  copy 
      在CODE上查看代码片 派生到我的代码片
    1. $ yum install mariadb-embedded mariadb-embedded-devel mariadb-libs mariadb-bench mariadb mariadb-server 
    然后再启动mariadb,正常,如果要设置开机自启动mariadb,使用以下命令:

    [plain]  view plain  copy 
      在CODE上查看代码片 派生到我的代码片
    1. $ systemctl enable mariadb 


    为人:谦逊、激情、博学、审问、慎思、明辨、 笃行
    学问:纸上得来终觉浅,绝知此事要躬行
    为事:工欲善其事,必先利其器。
    态度:道阻且长,行则将至;行而不辍,未来可期
    转载请标注出处!
  • 相关阅读:
    xxl-job如何保证调度的一致性
    mac安装homebrew
    JDBC自动加载驱动的SPI机制
    JDBC使用
    mysql的limit分页,越往后为什么越慢,怎么解决
    解决idea报错 "cannot access class
    BeanUtils.copyProperties复制失败探究
    xxl-job任务定时触发流程
    xxl-job一致性
    xxl-job高可用部署
  • 原文地址:https://www.cnblogs.com/ios9/p/14626889.html
Copyright © 2011-2022 走看看