当前位置: 首页 > news >正文

openeuler-24.3欧拉系统mysql开机自启报错

本地部署mysql服务,某天突然停电,导致数据库服务器重启了,然后第二天发现数据服务没有起来,mysql设置开机自启了,还是没有正常启动。登陆上去一看报错信息入下:

[root@db-01 ~]# systemctl status mysqld
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: deactivating (stop-sigterm) (Result: exit-code)
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 3067450 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Process: 3067469 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=1/FAILURE)
Tasks: 18 (limit: 47381)
Memory: 168.2M
CGroup: /system.slice/mysqld.service
└─ 3067471 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid

9月 28 11:48:20 db-01 mysqld[3067471]: 2025-09-28T03:48:20.927501Z 0 [Note] Shutting down plugin ‘INNODB_CMP’
9月 28 11:48:20 db-01 mysqld[3067471]: 2025-09-28T03:48:20.927504Z 0 [Note] Shutting down plugin ‘INNODB_LOCK_WAITS’
9月 28 11:48:20 db-01 mysqld[3067471]: 2025-09-28T03:48:20.927507Z 0 [Note] Shutting down plugin ‘INNODB_LOCKS’
9月 28 11:48:20 db-01 mysqld[3067471]: 2025-09-28T03:48:20.927510Z 0 [Note] Shutting down plugin ‘INNODB_TRX’
9月 28 11:48:20 db-01 mysqld[3067471]: 2025-09-28T03:48:20.927512Z 0 [Note] Shutting down plugin ‘InnoDB’
9月 28 11:48:20 db-01 mysqld[3067471]: 2025-09-28T03:48:20.927627Z 0 [Note] InnoDB: FTS optimize thread exiting.
9月 28 11:48:20 db-01 mysqld[3067471]: 2025-09-28T03:48:20.927763Z 0 [Note] InnoDB: Starting shutdown…
9月 28 11:48:20 db-01 systemd[1]: mysqld.service: Control process exited, code=exited, status=1/FAILURE
9月 28 11:48:21 db-01 mysqld[3067471]: 2025-09-28T03:48:21.027960Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
9月 28 11:48:21 db-01 mysqld[3067471]: 2025-09-28T03:48:21.028225Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 250928 11:48:21

× mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sun 2025-09-28 11:50:22 CST; 773ms ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 3081500 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Process: 3081519 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=1/FAILURE)

9月 28 11:50:22 db-01 systemd[1]: mysqld.service: Scheduled restart job, restart counter is at 3.
9月 28 11:50:22 db-01 systemd[1]: Stopped MySQL Server.
9月 28 11:50:22 db-01 systemd[1]: mysqld.service: Start request repeated too quickly.
9月 28 11:50:22 db-01 systemd[1]: mysqld.service: Failed with result ‘exit-code’.
9月 28 11:50:22 db-01 systemd[1]: Failed to start MySQL Server.

[ERROR] InnoDB: Operating system error number 13 in a file operation.
9月 28 14:28:00 db-01 mysqld[3998858]: 2025-09-28T06:28:00.074313Z 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
9月 28 14:28:00 db-01 mysqld[3998858]: 2025-09-28T06:28:00.074318Z 0 [ERROR] InnoDB: os_file_readdir_next_file() returned -1 in directory ./, crash recovery may have failed for some .ibd files!
9月 28 14:28:00 db-01 mysqld[3998858]: 2025-09-28T06:28:00.074355Z 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.

9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.809660Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822031Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822147Z 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822153Z 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822158Z 0 [ERROR] InnoDB: os_file_readdir_next_file() returned -1 in directory ./, crash recovery may have failed for some .ibd files!
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822168Z 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822172Z 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822176Z 0 [ERROR] InnoDB: os_file_readdir_next_file() returned -1 in directory ./, crash recovery may have failed for some .ibd files!
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822185Z 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822188Z 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822192Z 0 [ERROR] InnoDB: os_file_readdir_next_file() returned -1 in directory ./, crash recovery may have failed for some .ibd files!
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822200Z 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822203Z 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822207Z 0 [ERROR] InnoDB: os_file_readdir_next_file() returned -1 in directory ./, crash recovery may have failed for some .ibd files!
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822217Z 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822220Z 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822224Z 0 [ERROR] InnoDB: os_file_readdir_next_file() returned -1 in directory ./, crash recovery may have failed for some .ibd files!
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822236Z 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822240Z 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822243Z 0 [ERROR] InnoDB: os_file_readdir_next_file() returned -1 in directory ./, crash recovery may have failed for some .ibd files!
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822252Z 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822255Z 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822258Z 0 [ERROR] InnoDB: os_file_readdir_next_file() returned -1 in directory ./, crash recovery may have failed for some .ibd files!
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822267Z 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822271Z 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822274Z 0 [ERROR] InnoDB: os_file_readdir_next_file() returned -1 in directory ./, crash recovery may have failed for some .ibd files!
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822283Z 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822286Z 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822289Z 0 [ERROR] InnoDB: os_file_readdir_next_file() returned -1 in directory ./, crash recovery may have failed for some .ibd files!
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822300Z 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822304Z 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822307Z 0 [ERROR] InnoDB: os_file_readdir_next_file() returned -1 in directory ./, crash recovery may have failed for some .ibd files!
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822318Z 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822322Z 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822325Z 0 [ERROR] InnoDB: os_file_readdir_next_file() returned -1 in directory ./, crash recovery may have failed for some .ibd files!
9月 28 14:38:29 db-01 mysqld[4059521]: 2025-09-28T06:38:29.822336Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
9月 28 14:38:30 db-01 mysqld[4059521]: 2025-09-28T06:38:30.423007Z 0 [ERROR] Plugin ‘InnoDB’ init function returned error.
9月 28 14:38:30 db-01 mysqld[4059521]: 2025-09-28T06:38:30.423057Z 0 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
9月 28 14:38:30 db-01 mysqld[4059521]: 2025-09-28T06:38:30.423068Z 0 [ERROR] Failed to initialize builtin plugins.
9月 28 14:38:30 db-01 mysqld[4059521]: 2025-09-28T06:38:30.423074Z 0 [ERROR] Aborting
9月 28 14:38:30 db-01 mysqld[4059521]: 2025-09-28T06:38:30.423135Z 0 [Note] Binlog end
9月 28 14:38:30 db-01 mysqld[4059519]: Initialization of mysqld failed: 0
9月 28 14:38:30 db-01 mysqld[4059521]: 2025-09-28T06:38:30.423233Z 0 [Note] Shutting down plugin ‘CSV’
9月 28 14:38:30 db-01 mysqld[4059521]: 2025-09-28T06:38:30.423574Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
9月 28 14:38:30 db-01 systemd[1]: mysqld.service: Control process exited, code=exited, status=1/FAILURE
9月 28 14:38:30 db-01 systemd[1]: mysqld.service: Failed with result ‘exit-code’.
9月 28 14:38:30 db-01 systemd[1]: Failed to start MySQL Server.
9月 28 14:38:30 db-01 systemd[1]: mysqld.service: Scheduled restart job, restart counter is at 5.
9月 28 14:38:30 db-01 systemd[1]: Stopped MySQL Server.
9月 28 14:38:30 db-01 systemd[1]: mysqld.service: Start request repeated too quickly.
9月 28 14:38:30 db-01 systemd[1]: mysqld.service: Failed with result ‘exit-code’.
9月 28 14:38:30 db-01 systemd[1]: Failed to start MySQL Server.

经过排查没有问题,也不是目录损坏,都正常之后,mysql服务还是不能启动。然后突然想到防火墙查看防火墙也是正常的。然后想到欧拉系统的selinux服务需要手动设置成disabled。才能正常启动,于是把seliunx设置成disabled,之前部署时临时设置成0了,所以导致服务器重启后,mysql服务设置开机自启也没有启动起来。临时关闭一下seliunx服务(setenforce 0)再重启一下mysql服务就正常了。
#设置seliunx

setenforce 0 && sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
http://www.dtcms.com/a/601701.html

相关文章:

  • Versatile英文单词学习
  • 【OCP考试喜报】2025.11月 ORACLE OCP 考试通过
  • 【NCCL】NCCL 中的channel 是什么概念?
  • 工业自动化系统使用的高边驱动IC
  • 云南安宁做网站的公司皖icp备 网站建设
  • 做百度移动网站点击电脑有网
  • 如何高效设置机器学习超参数?——借鉴成熟AutoML框架的实践
  • python学习之路(七)
  • 长沙网站公司网站建设wordpress 分享到微信二维码
  • 主流的⼤语⾔模型
  • 03-事务高频面试总结
  • Go语言编译原理解析 | 提升开发效率的实用指南
  • html网站完整代码天元建设集团有限公司成立时间
  • 咨询转化率涨35%,声网AI客服拯救跨境生意
  • 培训系统哪家好?TOP10企业培训系统推荐!
  • 找网站推广做网站的法律
  • 基于Gradient Boosting模型的关键驱动因素分析:Permutation、SHAP与PDP/ALE的组合方法研究
  • lockdep状态相关定义如LOCK_ENABLED_HARDIRQ
  • seo优化网站查询网站流量狂刷器
  • 网页制作门户网站案例joomla 2.5:你的网站建设_使用与管理
  • BUUCTF-Misc
  • DFS-排列数字和n皇后-java实现
  • 3.2 自注意力与多头注意力:并行计算不同特征的秘密武器
  • 宁夏建设教育协会网站如何建立公司邮箱
  • 基于昇腾 配置pytorch环境
  • 武威做网站品牌平价网站建设
  • SpringBoot19-@Qualifier用法
  • 工程公司的会计做账有哪些科目官网seo怎么做
  • C语言:一种编译器?| 深入探讨C语言编译器的工作原理与发展
  • SpringBoot+Vue智慧诊所管理系统