starting mariadb server as a systemd service (systemctl start mariadb-server.service) fails with error message:
Incompatible header in messagefile '/usr/share/mysql/english/errmsg.sys'. Probably from another version of MariaDB".
The contents of errmsg.sys are something like below (sharing only few lines here):
*<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^]<*
There is another file, errmsg-utf8.txt at the folder /usr/share/mysql. The content of errmsg-utf8.txt is something like below (sharing only few lines here):
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
I have copied errmsg-utf8.txt file contents to errmsg.sys using the cat command:
cat /usr/share/mysql/errmsg-utf8.txt > /usr/share/mysql/english/errmsg.sys
and tried to start mariadb service. Still it shows the same error and service failed to start.
Tried to make things work out but not sure if my approach is the right way to solve the issue.
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