现象:

在centOS7中启动MySQL数据库提示:

Failed to start mysqld.service: Unit not found

【明明已经安装了,为什么提示不存在呢?】


原因:

在CentOS7中已经不在支持mysql,就算你已经安装了,CentOS7还是表示很嫌弃。


解决方案:

安装mysql的作者另起炉灶的开源版本:maria DB

(maria DB如同 MySQL 的影子版本,玛莉亚数据库是 MySQL 的一个分支版本(branch),而不是衍生版本(folk),提供的功能可和 MySQL 完全兼容)。

1.安装:

yum install -y mariadb-server

2.启动maria DB服务:

systemctl start mariadb.service

(说明:CentOS 7.x开始,CentOS开始使用systemd服务来代替daemon,原来管理系统启动和管理系统服务的相关命令全部由systemctl命令来代替。)

3.将mariadb服务添加至开机自启动:

systemctl enable mariadb.service

centOS7中启动MySQL数据库提示: Failed to start mysqld.service: Unit not foundc的更多相关文章

  1. CentOS7安装MySQL报错Failed to start mysqld.service: Unit not found解决办法

    1 ~]# systemctl start mysql.service 要启动MySQL数据库是却是这样的提示 1 ~]# Failed to start mysqld.service: Unit n ...

  2. CentOS7安装MySQL报错,解决Failed to start mysqld.service: Unit not found

    当输入命令 ~]# systemctl start mysql.service 要启动MySQL数据库是却是这样的提示 Failed to start mysqld.service: Unit not ...

  3. Failed to start mysqld.service: Unit not found

    输入命令 systemctl start mysql.service 要启动MySQL数据库是却是这样的提示 Failed to start mysqld.service: Unit not foun ...

  4. mysqld服务启动失败, Failed to restart mysqld.service: Unit not found.

    -bash-4.2# service mysqld restart Redirecting to /bin/systemctl restart mysqld.serviceFailed to rest ...

  5. Linux环境下启动MySQL数据库出现找不到mysqld.sock的解决办法!

    问题: 在普通用户权限下运行:mysql -u root -p,回车之后如果会出现如下错误:ERROR 2002 (HY000): Can't connect to local MySQL serve ...

  6. centos7 Failed to start firewalld.service: Unit is masked.

    centos7 启动防火墙失败:Failed to start firewalld.service: Unit is masked.   ---- 刚yum安装了iptables 解决: 执行”sys ...

  7. Failed to restart ssh.service: Unit not found.

    环境 操作系统:CentOS 7 问题 重启ssh服务,启动报错:Failed to restart ssh.service: Unit not found. 操作步骤 1. 编辑sshd_confi ...

  8. centos7中启动tomcat提示bash: tomcat8.0.39/bin/startup.sh: 权限不够

    问题描述: centos7中启动tomcat提示bash: tomcat8.0.39/bin/startup.sh: 权限不够 解决方案:先进入bin目录 [root@localhost/]# cd ...

  9. Flask项目中使用mysql数据库启动项目是发出警告

    Flask项目中使用mysql数据库启动项目是发出警告: Warning: (1366, "Incorrect string value: '\xD6\xD0\xB9\xFA\xB1\xEA ...

随机推荐

  1. Linux 进程调度笔记(一)

    主要讨论的是单核 CPU 的情况下,进行调度的一些算法和思路.讨论都是基于单核 CPU 的条件下进行. 在内存中,无论对于用户而言有多少个进程,但在 CPU 运行的时候,总是只有只执行一个进程.进程调 ...

  2. 树莓派3b 换国内源 更新源

    在国内要更新源的时候,因为是国外的源,总会出现网速太慢的问题, 以下是对于安装了,2017-11-29-raspbian-stretch 系统源 更换最好用root登陆操作 sudo passwd r ...

  3. PP: Soft-DTW: a differentiable loss function for time-series

    Problem: new loss Label: new loss; Abstract: A differentiable learning loss; Introduction: supervise ...

  4. LeetCode 3sum-closest 题解

    思路 排序 枚举一个数a 双指针移动法确定b和c 求和,更新最接近的值 复杂度 T(n)=O(n2)  M(n)=O(1)T(n)=O(n^2) \; M(n)=O(1)T ...

  5. 【Unity|C#】基础篇(12)——反射(Reflection)(核心类:Type、Assembly)

    [学习资料] <C#图解教程>(第24章):https://www.cnblogs.com/moonache/p/7687551.html 电子书下载:https://pan.baidu. ...

  6. SpringMVC 和 Struts2的区别

    SpringMVC 和 Struts2的区别   1.Struts2是类级别的拦截, 一个类对应一个request上下文,SpringMVC是方法级别的拦截,一个方法对应一个request上下文,而方 ...

  7. 跨站脚本(XSS)

    1.1 XSS定义 XSS,即为(Cross Site Scripting),中文名为跨站脚本,是发生在目标用户的浏览器层面上的,当渲染DOM树的过程发生了不在预期内执行的JS代码时,就发生了XSS攻 ...

  8. linux多线程编程的应用场景

  9. 微信小程序weui的使用

    大家好,我是前端菜鸟,大家可以叫我惊蛰,今天给大家分享一下在微信小程序中对weui的引入和使用,其他的也不再赘述,文中有不对的还请指正,谢谢. 直入主题: 1.下载weui 进入GitHub http ...

  10. Windows中配置maven环境变量

    添加maven环境变量 添加新的系统环境变量:MAVEN_HOME 设置其值为你安装的目录:D:\IT_program\apache-maven-3.6.0 更新系统PATH 变量 添加变量值:%MA ...