首页 > 数据库 >问题记录之mysql:Job for mysqld.service failed because the control process exited with error code. See &qu

问题记录之mysql:Job for mysqld.service failed because the control process exited with error code. See &qu

时间:2023-05-16 18:22:48浏览次数:36  
标签:control 文件 service sock systemctl mysqld mysql

今天服务器连接mysql发现一直超时(查出的原因是磁盘满了)清了磁盘以后,mysqld.service 还是无法启动

执行命令及报错如下:(注意,因为磁盘满的问题,我的mysql并不是正常途径关闭的)

控制进程以错误代码退出导致无法以正常的方式启动它了,

错误说明:Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.

  1. 运行以下命令来检查状态mysqld.servicesystemctl status mysqld.service

   此命令提供有关服务当前状态的信息以及可能出现的任何错误消息。查找导致服务失败的特定错误代码或错误消息。

  2. 此外,可以使用该journalctl命令检查系统日志中是否有任何相关的错误消息。运行以下命令:journalctl -xe

  此命令将显示系统日志,包括在启动或执行mysqld.service. 查找有关可能导致服务失败的原因的相关错误消息或线索。

通过检查这些命令的输出,您应该能够收集有关导致失败的特定错误的更多信息mysqld.service。此信息将帮助您进行故障排除和解决问题。

还有就是查一下mysql的启动日志  :tailf /var/log/mysqld.log

 

一些参考资料:https://stackoverflow.com/questions/42317139/job-for-mysqld-service-failed-see-systemctl-status-mysqld-service

https://stackoverflow.com/questions/11990708/error-cant-connect-to-local-mysql-server-through-socket-var-run-mysqld-mysq/26460819#26460819

 

如果你是新装的mysql,一些处理参考:

    1. 首先,找到(在终端中使用“sudo find / -type s”)您的mysql.sock文件所在的位置。我的位置是:
    2. 启动终端并发布 sudo Nautilus
      这将以超级用户权限启动你的文件管理器
    3. 从 Nautilus 导航到mysql.sock文件所在的 位置
    4. 右键单击该文件并选择建立链接
    5. 将链接文件重命名为mysqld.sock然后右键单击该文件并剪切
    6. 转到/var/run并创建一个名为的文件夹mysqld并输入它
    7. 现在右键单击并粘贴链接文件
    8. 现在将在/var/run/mysqld/mysqld.sock 处拥有一个mysqld.sock文件

问题解决:

  在我的操作环境中我的mysqld.sock文件是有的,/etc/my.cnf  路径下的socket引用也是正常的,查询下来是这个文件的权限被修改了,变成了root权限,修改权限之后重启即可

 

 

标签:control,文件,service,sock,systemctl,mysqld,mysql
From: https://www.cnblogs.com/Jenny-sider/p/17406448.html

相关文章

  • Best practices for customization | Kentico 12 Service Pack Documentation (xperie
    Bestpracticesforcustomization|Kentico12ServicePackDocumentation(xperience.io)UsingjQuery Note:TheinformationinthissectiononlyappliestotheKenticoadministrationinterfaceandsitesbuiltusingthePortalEnginedevelopmentmodel,......
  • DrawerLayout配合WindowManager在service中使用
    1.原理理解抽屉组件依附在WindowManager上,WindowManager大于DrawerLayout,因此DrawerLayout抽出和放回是基于WindowManager已经展示出来的情况。2.布局文件<?xmlversion="1.0"encoding="utf-8"?><RelativeLayoutxmlns:android="http://schemas.android.com/apk/res/androi......
  • 【遇到的问题】com.mysql.jdbc.MysqlDataTruncation 报错
    com.mysql.jdbc.MysqlDataTruncation:Datatruncation:Incorrectdatevalue:‘null’forcolum‘time’atrow1发现代码执行过程中数据存储失败,但是在数据库中执行语句又可以成功。在网络上搜索解决方案,但都解决无果:以为是String类型和Date类型转换的问题mysql-......
  • How to use the Raspberry Pi and Python to control a buzzer All In One
    HowtousetheRaspberryPiandPythontocontrolabuzzerAllInOne如何使用树莓派和Python来控制蜂鸣器蜂鸣器有源蜂鸣器vs无源蜂鸣器现在有很多人对有源蜂鸣器和无源蜂鸣器的概念不是很清楚,这里做简单介绍,希望对大家日后使用有所帮助。注意,这里的“源”不是指......
  • Spring 3 & jBPM 5 & LocalTaskService
    帖子地址:[url]https://community.jboss.org/thread/195386[/url]HiGuys,IamalsostrugglinginconfigSpring+LocalHumanTask.Iamusing[color=red][b]Spring3.0,JBPM5.4.0.Final,Drools5.5.0.Final[/b][/color]IcanconfigtouseJTA......
  • springboot 整合webservice 相关说明
    1.环境依赖jdk8,springboot2.3.12.release,cxf版本需要根据springboot版本修改,方法:查看springboot版本的发布日期,然后根据日期找相近的两个版本<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter</artifactId><versi......
  • C#中TabControl相关用法
    https://blog.csdn.net/fenglearning/article/details/118330487https://blog.csdn.net/u011555996/article/details/53199362?spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-53199362-blog-118330487.23......
  • 跨域问题解决记录Access-Control-Allow-Origin方法
      more_set_headers 'Access-Control-Allow-Origin: http://devops.opsenv.com';    more_set_headers 'Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS';    more_set_headers 'Access-Control-Allow-Headers: Authorization,DNT,......
  • Intel(R) Ethernet Controller X710驱动升级
    环境CentOSLinuxrelease7.9.2009(Core)升级先查看原驱动版本[root@xcdcs~]#lspci|grepnet01:00.0Ethernetcontroller:IntelCorporationEthernetControllerX710for10GbESFP+(rev02)01:00.1Ethernetcontroller:IntelCorporationEthernetController......
  • Microsoft.Exchange.WebServices.Data;
    using Microsoft.Exchange.WebServices.Data;using Microsoft.Identity.Client;using System;using System.Configuration; namespace EwsOAuth{   class Program  {     static async System.Threading.Tasks.Task Main(string[] args) ......