安裝完了 mariadb 后 有一天重啟機器發現 啟動不了 mariadb.service
systemctl start mariadb.service //然后發現下面的問題
job for mariadb.service failed because the control process exited with error code .
See "systemctl status mariadb.service" and "journalctl -xe" for details
// 按照上面的 查看 一無所獲 但是看見了 "journalctl -xe"里面在啟動 mariadb的時候 有Logging to '/var/log/mariadb/mariadb.log' 然后就去查看了這個 log
找到最后下面在Aborting 上面有 一行 Character set 'utf8' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index.xml'
之后去查看這個Index.xml 發現里面有utf8 這個配置
日了狗了
然后就猜想 服務器的配置可能沒指定 字符集
接着找到 服務器配置
在/etc/mycnf.d 里面有一個 server.cnf 在 [mysqld] 下面 添加
character-set-server=utf8 保存
然后 systemctl start mariadb.service
ok搞定