使用yum install mysql-server后,使用systemctl start mysql报错
Active: failed (Result: exit-code) since Wed 2023-02-22 16:29:08 CST; 6s ago
Process: 5880 ExecStopPost=/usr/libexec/mysql-wait-stop (code=exited, status=0/SUCCESS)
Process: 5878 ExecStart=/usr/libexec/mysqld --basedir=/usr (code=exited, status=1/FAILURE)
查看mysql日志
/usr/libexec/mysqld执行错误,查看红色预警,所属主、组都是root,使用chown mysql.mysql mysqld更改所属主、组
重新执行mysqld还是报错
查看该目录不存在,使用mkdir -pv mysql/data 创建目录,并更改为mysql为所属主、组
重新启动mysqld