问题:命令 $ systemctl start mariadbmysql
报错 :Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.sql
命令$ journalctl -xe 找到问题反馈vim
查看MariaDB日记:socket
$ cd /var/log/mariadbspa
$vim mariadb.logcode
发现报错:/usr/libexec/mysqld: unknown variable 'default-character-set=utf8'server
错误定位:mariadb的配置文件 /etc/my.conf it
从新修改配置以下:io
[mysqld]
character-set-server=utf8event
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd
[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
再启动:$ systemctl start mariadb
成功!