在CentOS7.6上安装了MariaDB10.3,采用的yum方式安装的,用命令查看数据库的状态会报错误
[root@centos7 ~]# service mysql status ERROR! MariaDB is running but PID file could not be found
在配置文件/etc/my.cnf中增加一行,pid_file=/var/lib/mysql/centos7.pid
然后在查询mysql的状态,正常!
[root@centos7 ~]# service mysql status SUCCESS! MariaDB running (3867)