赞
踩
[root@instance-7m3omjg9 /]# systemctl status mysqld ● mysqld.service - MySQL 8.0 database server Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Fri 2020-08-07 09:47:21 CST; 1min 45s ago Process: 11782 ExecStopPost=/usr/libexec/mysql-wait-stop (code=exited, status=0/SUCCESS) Process: 11779 ExecStart=/usr/libexec/mysqld --basedir=/usr (code=exited, status=1/FAILURE) Process: 11742 ExecStartPre=/usr/libexec/mysql-prepare-db-dir mysqld.service (code=exited, status=0/SUCCESS) Process: 11718 ExecStartPre=/usr/libexec/mysql-check-socket (code=exited, status=0/SUCCESS) Main PID: 11779 (code=exited, status=1/FAILURE) Status: "Server startup in progress" Error: 2 (No such file or directory) Aug 07 09:47:20 instance-7m3omjg9 systemd[1]: Starting MySQL 8.0 database server... Aug 07 09:47:21 instance-7m3omjg9 systemd[1]: mysqld.service: Main process exited, code=exited, status=1/FAILURE Aug 07 09:47:21 instance-7m3omjg9 systemd[1]: mysqld.service: Failed with result 'exit-code'. Aug 07 09:47:21 instance-7m3omjg9 systemd[1]: Failed to start MySQL 8.0 database server.
首先检查了 mysqld.log 日志,得到了报错的日志信息
2020-08-07T01:38:36.676475Z 1 [ERROR] [MY-012271] [InnoDB] The innodb_system data file 'ibdata1' must be writable
2020-08-07T01:38:36.676521Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2020-08-07T01:38:36.676691Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2020-08-07T01:38:36.677724Z 0 [ERROR] [MY-010119] [Server] Aborting
根据日志信息知道了是 ‘ibdata1’ 数据文件必须是可写的
所以更改权限即可
输入
chmod -R 777 /var/lib/mysql
然后重新启动服务
service mysqld start
启动完成后检查服务是否启动成功即可!
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。