输入命令

systemctl start mysql.service

要启动MySQL数据库是却是这样的提示

Failed to start mysqld.service: Unit not found

解决方法如下:

首先需要安装mariadb-server

yum install -y mariadb-server

启动服务

systemctl start mariadb.service

添加到开机启动

systemctl enable mariadb.service

进行一些安全设置,以及修改数据库管理员密码

[zhaojq@localhost]$ mysql_secure_installation

mysql给root开启远程访问权限
use mysql;
select User,authentication_string,Host from user;

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456';
flush privileges;

Failed to start mysqld.service: Unit not found的更多相关文章

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

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

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

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

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

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

  4. centOS7中启动MySQL数据库提示: Failed to start mysqld.service: Unit not foundc

    现象: 在centOS7中启动MySQL数据库提示: Failed to start mysqld.service: Unit not found [明明已经安装了,为什么提示不存在呢?] 原因: 在 ...

  5. centos7安装MariaDB以及Failed to start mariadb.service: Unit not found的错误解决

    centos7下yum安装MariaDB CentOS 7下mysql下替换成MariaDB了.MariaDB数据库管理系统是MySQL的一个分支,主要由开源社区在维护,采用GPL授权 许可 Mari ...

  6. Failed to stop iptables.service: Unit iptables.service not loaded.

    redhat 7 [root@lk0 ~]# service iptables stop Redirecting to /bin/systemctl stop iptables.service Fai ...

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

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

  8. docker报错:Failed to restart docker.service: Unit not found.

    前言:我之前安装好docker了,但是关机重启后,发现docker就没了 报错:Failed to restart docker.service: Unit not found.   解决方法: 1. ...

  9. [ISSUE] [Centos] Centos Start Nginx Show: Failed to start nginx.service:unit not found

    CMD Line:systemctl start nginx.serviceFailed to start nginx.service: Unit not found. Solution: 1.vim ...

随机推荐

  1. Spring Aop和Spring Ioc(二)

    Spring IOC: DI注入集合类型: 实体类: package cn.spring.entity; import java.util.*; public class Dientity { pri ...

  2. STL-map/multimap 简述

    #include <iostream> #include <cstdio> #include <map> using namespace std; int main ...

  3. JS实现粒子拖拽吸附特效-sunziren

    特效的效果就如同本页面的背景一样,有粒子随机移动.连结,甚至是吸附到你的鼠标周围. 代码如下,只要引入JQuery和一小段JS代码就可以了.本质上用到了Html5的canvas <script ...

  4. 史上最深入浅出的IT术语解读

    假设你是个妹子,你有一位男朋友,与此同时你和另外一位男生暧昧不清,比朋友好,又不是恋人.你随时可以甩了现任男友,另外一位马上就能补上.这是冷备份. 假设你是个妹子,同时和两位男性在交往,两位都是你男朋 ...

  5. Java(四)输出和输入函数

    介绍一下Java里简单常用的输入输出方法. Java的输出函数很简单,直接调用System类的out对象的print函数即可. 代码: System.out.print(a);//输出变量a的值 Sy ...

  6. USB闪存驱动器未显示在MacOS的Finder或磁盘工具上?为什么Mac无法识别USB该如何解决?

    您可能会在Mac上无法显示的闪存驱动器上形成困扰.您确定驱动器正常,但Mac计算机无法检测到.  阅读这篇文章,闪存驱动器未显示在MacOS的Finder或磁盘工具上?为什么Mac无法识别USB该如何 ...

  7. VSCode部署JAVA项目出现The type java.lang.Object cannot be resolved

    如题,出现的原因是这样的:我将mac系统上的eclipse项目复制到了ubuntu环境下,通过vscode的远程功能连接ubuntu. 然后项目上就出现了各种报错,显示The type java.la ...

  8. 推荐15款Google Chrome 插件

    Google Chrome是由Google开发的免费网页浏览器.Chrome是化学元素“铬”的英文名称,过去也用Chrome称呼浏览器的外框.Chrome相应的开放源代码计划名为Chromium,而G ...

  9. C# 串口关闭时主界面卡死原因分析

    目录 问题描述 查找原因 SerialPort类Open()方法 SerialPort类Close()方法 死锁原因 解决死锁 总结 问题描述 前几天用SerialPort类写一个串口的测试程序,关闭 ...

  10. MVC理解(全程白话不拽词)

    我所发的所有博客只为了给想干程序员,但是基础没有或者很差,刚入职场的人 所有的观点不一定准确,我不懂的或者不理解的都会备注出来 先说MVC MVC理解为:M  =  Model  =  数据库表里面每 ...