irpas技术客

mariadb启动时报错Job for mariadb.service failed because the control process exited wi

网络投稿 6515

arm架构 centos mariadb启动时报错Job for mariadb.service failed because the control process exited with error code.

mariadb作为mysql的一个分支 其安装方式和mysql还有不同 但是具体启动原理还都大同小异

[root@ecs-6ab1 bin]# systemctl start mysql Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.

安装在鲲鹏服务器(arm架构)的mysql突然挂掉 以为是配置文件的问题 所以在修改my.ini文件进行重新启动 但是在执行systemctl start mysql命令时就会出现这个问题。

这个报错其实时不能看出具体错误 只是提示你启动失败 但是启动失败在安装没问题的情况下一般就是配置文件的问题。

由于systemctl start mysql这种启动方式属于全局启动方式 所以在/var/log/mariadb/mariadb.log日志下是没有具体的报错信息的(mariadb.log在etc下的my.ini或者在my.cnf.d文件夹下有默认配置 我的这个配置在/etc/my.cnf.d/mariadb-server.cnf里边 在我的服务器上是这么的 也可能是我的全局启动配置出了问题 也没深究)

[mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock log-error=/var/log/mariadb/mariadb.log pid-file=/run/mariadb/mariadb.pid

这种问题看不到日志的情况下 就可以使用mysql启动程序来进行启动

查找程序启动的位置

[root@ecs-6ab1 bin]# find /usr /home -name mysqld_safe /usr/bin/mysqld_safe

找到位置后就可以用mysqld_safe进行启动

./mysqld_safe --user=root --basedir=/var/lib/mysql --datadir=/var/lib/mysql &

具体可以参考(https://·/xuey/p/10460495.html)我应该也是这里边介绍的问题 在重启之后sock丢失 导致启动失败

启动之后就每次查看日志 一步步解决问题

直至日志中没有错误 用命令行进行连接

[root@ecs-6ab1 ~]# mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 10 Server version: 10.3.28-MariaDB-log MariaDB Server Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]>

成功!!!

具体的my.ini配置可以参考(https://segmentfault.com/a/1190000021408999)


1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,会注明原创字样,如未注明都非原创,如有侵权请联系删除!;3.作者投稿可能会经我们编辑修改或补充;4.本站不提供任何储存功能只提供收集或者投稿人的网盘链接。

标签: #mariadb启动报错job #arm架构 #CentOS #mariadb启动时报错Job #for #mariadbservice #failed #because