![mariadb 服务器启动失败](https://linux22.com/image/145435/mariadb%20%E6%9C%8D%E5%8A%A1%E5%99%A8%E5%90%AF%E5%8A%A8%E5%A4%B1%E8%B4%A5.png)
将 mariadb 服务器作为 systemd 服务 ( systemctl start mariadb-server.service
) 启动失败并显示错误消息:
消息文件“/usr/share/mysql/english/errmsg.sys”中的标头不兼容。可能来自 MariaDB 的另一个版本”。
内容errmsg.sys
如下(这里只分享几行):
*<84>
¡
Î
^A^K8^Kd^K¶^K^G^Le^L}^L<92>^L°^LÇ^Lø^L^O^Mb^M¥^Mñ^M<^NZ^N<92>^N°^NN^O<94>^OÇ^Oô^O7^PN^Pn^P}^P©^Pß^P ^QP^Q<86>^Q¨^QÇ^QZ^Rh^R<84>^Rµ^Rá^R^C^S$^SB^S<8f>^S³^SÏ^Sï^S)^T:^TÉ^T=^U~^Uö^U^T^V@^Vd^V<86>^V¿^Væ^V^H^Wj^W©^W^L^Xv^X¤^XÓ^X\^Y<8e>^Y¬^YÆ^Yå^YW^Z<99>^ZÕ^Z%^[<81>^[°^[Ö^[+^\e^\è^\,^]L^]<*
errmsg-utf8.txt
文件夹中还有另一个文件/usr/share/mysql
。内容errmsg-utf8.txt
如下(这里只分享几行):
languages czech=cze latin2, danish=dan latin1, dutch=nla latin1, english=eng latin1, estonian=est latin7, french=fre latin1, german=ger latin1, greek=greek greek, hungarian=hun latin2, italian=ita latin1, japanese=jpn ujis, japanese-sjis=jps sjis, korean=kor euckr, norwegian-ny=norwegian-ny latin1, norwegian=nor latin1, polish=pol latin2, portuguese=por latin1, romanian=rum latin2, russian=rus koi8r, serbian=serbian cp1250, slovak=slo latin2, spanish=spa latin1, swedish=swe latin1, ukrainian=ukr koi8u;
default-language eng
start-error-number 1000
我已使用 cat 命令复制errmsg-utf8.txt
文件内容:errmsg.sys
cat /usr/share/mysql/errmsg-utf8.txt > /usr/share/mysql/english/errmsg.sys
并尝试启动 mariadb 服务。仍然显示相同的错误并且服务无法启动。
试图让事情顺利进行,但不确定我的方法是否是解决问题的正确方法。
mariadb-server.service
:
[Unit]
Description=MariaDB server
[Service]
Type=simple
ExecStart=/opt/mariadb/10.3.9/bin/mysqld --basedir=/opt/mariadb/10.3.9 --datadir=/var/lib/mysql --lc-messages-dir=/usr/share/mysql/english --plugin-dir=/opt/mariadb/10.3.9/lib/plugin --user=root --log-error=/var/log/mariadb/mariadb.log --pid-file=/var/run/mariadb/mariadb.pid --socket=/var/lib/mysql/mysql.sock
ExecStop=always
Environment=
RestartSec=10**
[Install]
WantedBy=default.target