赞
踩
$ systemctl status mysqld.service ● 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 Wed 2023-06-07 15:09:41 CST; 18s ago Process: 2100381 ExecStopPost=/usr/libexec/mysql-wait-stop (code=exited, status=0/SUCCESS) Process: 2100378 ExecStart=/usr/libexec/mysqld --basedir=/usr (code=exited, status=1/FAILURE) Process: 2100341 ExecStartPre=/usr/libexec/mysql-prepare-db-dir mysqld.service (code=exited, status=0/SUCCESS) Process: 2100316 ExecStartPre=/usr/libexec/mysql-check-socket (code=exited, status=0/SUCCESS) Main PID: 2100378 (code=exited, status=1/FAILURE) Status: "Server shutdown complete" Error: 13 (权限不够) 6月 07 15:09:40 edh09.gk.com systemd[1]: Starting MySQL 8.0 database server... 6月 07 15:09:41 edh09.gk.com systemd[1]: mysqld.service: Main process exited, code=exited, status=1/FAILURE 6月 07 15:09:41 edh09.gk.com systemd[1]: mysqld.service: Failed with result 'exit-code'. 6月 07 15:09:41 edh09.gk.com systemd[1]: Failed to start MySQL 8.0 database server.
chown -R mysql [mysql 目录]
如果是修改了mysql的目录,不再使用默认的目录地址,还需执行以下命令,保证mysql目录附带mysqld_db_t标志
chcon -R -t mysqld_db_t [mysql 目录]
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。