输入命令

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. C# sqlite 事务提交多个语句,提升插入速度

    private SQLiteConnection connection; private SQLiteCommand command; private SQLiteTransaction transa ...

  2. STL-set&&multiset 集合

    #include <iostream> #include <cstdio> #include <set> // 仿函数的原型 //struct greaters / ...

  3. Node.js_1.1

    Node.js简介 Node.js是一个能够在服务器端运行JavaScript的开源代码.跨平台JavaScript运行环境 Node采用Google开发的V8引擎运行js代码,使用事件驱动.非阻塞和 ...

  4. Python第三方库requests的编码问题

    PS:这个解决方法可能很简单,但是这是平时的一些细节问题,所以有必要提醒一下! 首先代码不多,就是通过get方法去获取豆瓣首页信息,如图:但是会报UnicodeEncodeError: 'gbk' c ...

  5. webkit 技术内幕 笔记 一

    目前应用最广的渲染引擎项目-webkit webkit 内部渲染html网页的原理 webkit 内容工作原理 web 的接入口浏览器 浏览器的内核-渲染引擎(像webkit)

  6. 谈一谈php反序列化

    1.序列化与反序列化 php中有两个函数serialize()和unserialize() 序列化serialize(): 当在php中创建了一个对象后,可以通过serialize()把这个对象转变成 ...

  7. vue之项目打包部署到服务器

    这是今年的第一篇博客.整理一下vue如何从项目打包到部署服务器,给大家做下分享,希望能给大家带来或多或少的帮助,喜欢的大佬们可以给个小赞,如果有问题也可以一起讨论下. 第一步:这是很关键的一步.打开项 ...

  8. .NetCore3.0短网址项目

    Wei.TinyUrl 基于.NetCore3.0 + Mysql开发的短网址项目 项目地址:https://github.com/a34546/Wei.TinyUrl 演示效果: 快速开始 1. 修 ...

  9. Qt Installer Framework翻译(7-7)

    脚本API 下表总结了可以在控制器和组件脚本中使用的全局JavaScript对象. QMessageBox 提供一个模式对话框,通知用户或询问用户问题并接收答案 buttons 提供可在安装程序页面上 ...

  10. Codeforces 764C Timofey and a tree

    Each New Year Timofey and his friends cut down a tree of n vertices and bring it home. After that th ...