当前位置:网站首页>MySQL startup error: innodb: operating system error number 13 in a file operation
MySQL startup error: innodb: operating system error number 13 in a file operation
2022-06-13 08:55:00 【Turn X7】
start-up mysql Report errors :
[[email protected] ~]# systemctl start mysqld
Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.
There are three ways to view error information :
1. systemctl status mysqld.service
[[email protected] ~]# systemctl status mysqld.service
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: failed (Result: start-limit) since 6、 ... and 2020-03-14 03:55:06 CST; 14s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 73992 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=1/FAILURE)
Process: 73975 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 72217 (code=exited, status=0/SUCCESS)
3 month 14 03:55:06 localhost.localdomain systemd[1]: Failed to start MySQL Server.
3 month 14 03:55:06 localhost.localdomain systemd[1]: Unit mysqld.service entered failed state.
3 month 14 03:55:06 localhost.localdomain systemd[1]: mysqld.service failed.
3 month 14 03:55:06 localhost.localdomain systemd[1]: mysqld.service holdoff time over, scheduling restart.
3 month 14 03:55:06 localhost.localdomain systemd[1]: Stopped MySQL Server.
3 month 14 03:55:06 localhost.localdomain systemd[1]: start request repeated too quickly for mysqld.service
3 month 14 03:55:06 localhost.localdomain systemd[1]: Failed to start MySQL Server.
3 month 14 03:55:06 localhost.localdomain systemd[1]: Unit mysqld.service entered failed state.
3 month 14 03:55:06 localhost.localdomain systemd[1]: mysqld.service failed.
2. journalctl -xe
[[email protected] ~]# journalctl -xe
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysqld.service has failed.
--
-- The result is failed.
3 month 14 03:55:04 localhost.localdomain systemd[1]: Unit mysqld.service entered failed state.
3 month 14 03:55:04 localhost.localdomain systemd[1]: mysqld.service failed.
3 month 14 03:55:05 localhost.localdomain systemd[1]: mysqld.service holdoff time over, scheduling restart.
3 month 14 03:55:05 localhost.localdomain systemd[1]: Stopped MySQL Server.
-- Subject: Unit mysqld.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysqld.service has finished shutting down.
3 month 14 03:55:05 localhost.localdomain systemd[1]: Starting MySQL Server...
-- Subject: Unit mysqld.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysqld.service has begun starting up.
3 month 14 03:55:06 localhost.localdomain mysqld[73992]: Initialization of mysqld failed: 0
3 month 14 03:55:06 localhost.localdomain systemd[1]: mysqld.service: control process exited, code=exited status=1
3 month 14 03:55:06 localhost.localdomain systemd[1]: Failed to start MySQL Server.
-- Subject: Unit mysqld.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysqld.service has failed.
--
-- The result is failed.
3 month 14 03:55:06 localhost.localdomain systemd[1]: Unit mysqld.service entered failed state.
3 month 14 03:55:06 localhost.localdomain systemd[1]: mysqld.service failed.
3 month 14 03:55:06 localhost.localdomain systemd[1]: mysqld.service holdoff time over, scheduling restart.
3 month 14 03:55:06 localhost.localdomain systemd[1]: Stopped MySQL Server.
-- Subject: Unit mysqld.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysqld.service has finished shutting down.
3 month 14 03:55:06 localhost.localdomain systemd[1]: start request repeated too quickly for mysqld.service
3 month 14 03:55:06 localhost.localdomain systemd[1]: Failed to start MySQL Server.
-- Subject: Unit mysqld.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysqld.service has failed.
--
-- The result is failed.
3 month 14 03:55:06 localhost.localdomain systemd[1]: Unit mysqld.service entered failed state.
3 month 14 03:55:06 localhost.localdomain systemd[1]: mysqld.service failed.
misarrangement :
After looking at the log, you can see ERROR Information , What I don't understand can be translated , Easy to understand , Looking for useful information . Log path can be accessed through /etc/my.cnf The file to view
[ERROR] InnoDB: Operating system error number 13 in a file operation.
[ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
[ERROR] InnoDB: os_file_get_status() failed on './ibdata1'. Can't determine file permissions
[ERROR] InnoDB: Plugin initialization aborted with error Generic error
[ERROR] Plugin 'InnoDB' init function returned error.
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[ERROR] Failed to initialize builtin plugins.
[ERROR] Aborting
↓↓↓↓↓↓
[ error ] InnoDB: Operating system error number in file operation 13.
[ error ] InnoDB: The error means mysqld No access to the directory .
[ error ] InnoDB: os_file_get_status() Failed on ./ibdata1. Unable to determine file permissions
[ error ] InnoDB: Plug in initialization aborted , There is a general error
[ error ] plug-in unit “InnoDB” The initialization function returned an error .
[ error ] plug-in unit “InnoDB” Failed to register as storage engine .
[ error ] Failed to initialize the built-in plug-in .
[ error ] suspend
Solution :
[[email protected] ~]# getenforce // see selinux state
Enforcing
[[email protected] ~]# setenforce 0 // Temporarily Closed selinux, Failure after restart
[[email protected] ~]# getenforce
Permissive
[[email protected] ~]# systemctl start mysqld // start-up mysql Service successfully
[[email protected] ~]# ss -antulp | grep :3306
tcp LISTEN 0 80 [::]:3306 [::]:* users:(("mysqld",pid=74057,fd=17))
Permanent ban selinux
[[email protected] ~]# cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
Backup configuration files
[[email protected] ~]# cp -r /etc/selinux/config /etc/selinux/config.bak
[[email protected] ~]# sed -i 's/SELINUX=enforcing/\SELINUX=disabled/' /etc/selinux/config
[[email protected] ~]# cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
边栏推荐
- Mapbox loads nationwide and provincial range, displaying multi-color animation points, migration lines, 3D histogram, etc
- What exactly is Huawei cloud desktop saying when it says "smooth"?
- 浅析Visual Studio 使用
- Namespace in TS (2)
- JS wrapper object
- 教程篇(5.0) 01. 产品简介及安装 * FortiEDR * Fortinet 网络安全专家 NSE 5
- Problems in the deconstruction and assignment of objects, comparison between empty strings and undefined
- How to save the video of wechat video number locally?
- JS array method
- 【网络安全】SQL注入新思维之webshell提权
猜你喜欢
CentOS installing MySQL and setting up remote access
About RSA encryption and decryption principle
DIY无人机(匿名拓控者P2+F330机架)
Cesium achieves sunny, rainy, foggy, snowy and other effects
Basic use of cesium, including loading images, terrain, models, vector data, etc
Vs installation of vassistx plug-in causes Chinese input of wpf-xaml file to be garbled. Solution
【安全】零基础如何从0到1逆袭成为安全工程师
5. Attribute selector
Installing pytorch under Anaconda
WARNING:tornado. access:404 GET /favicon. ICO (172.16.8.1) 1.84ms [with static file settings]
随机推荐
6、 JS naming rules and specifications
PHP wechat special merchant incoming V3 packaging interface
Replace jade engine with EJS
【网络安全】SQL注入新思维之webshell提权
Svg text stroke effect
【leetcode周赛记录】第80场双周赛记录
How to resolve "the operation cannot be completed successfully because the file contains viruses or potentially junk software
Loss outputs Nan for the Nan model
JS obtain geographic location information according to longitude and latitude and mark it on the map
Gbase 8A v95 vs v86 compression strategy analogy
Namespace in TS (1)
Invalid flex layout setting width
[QNX hypervisor 2.2 user manual] 4.5.1 build QNX guest
Wrap dynamically created child elements in dynamically created structures
网上开户安全吗?新手可以开账户吗?
Vscode double shortcut keys up, down, left and right
A solution to create a new EXCEL workbook on win10 computer and change the suffix to xlsm (normally it should be xlsx)
\Difference between N and \r
JS array using the reduce() method
Animation through svg