systemctl status mariadb.service 失败了 directory /var/lib/mysql is not empty

图数据库猫 发布于 10/18 19:36
阅读 46
收藏 0

systemctl status mariadb.service
● mariadb.service - MariaDB database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Fri 2019-10-18 19:33:45 CST; 31s ago

Oct 18 19:33:44 k8s133-master systemd[1]: Starting MariaDB database server...
Oct 18 19:33:45 k8s133-master mariadb-prepare-db-dir[4167]: Database MariaDB is not initialized, but the directory /var/lib/mysql is not empty, so initializatio... be done.
Oct 18 19:33:45 k8s133-master mariadb-prepare-db-dir[4167]: Make sure the /var/lib/mysql is empty before running mariadb-prepare-db-dir.
Oct 18 19:33:45 k8s133-master systemd[1]: mariadb.service: control process exited, code=exited status=1
Oct 18 19:33:45 k8s133-master systemd[1]: Failed to start MariaDB database server.
Oct 18 19:33:45 k8s133-master systemd[1]: Unit mariadb.service entered failed state.
Oct 18 19:33:45 k8s133-master systemd[1]: mariadb.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
 

加载中
0
gammey
gammey

你这是刚安装的mariadb吗?

这是让你确认/var/lib/mysql目录是不是空的,或者里面有一些内容无法写入。如果新安装的没有数据,直接把目录清空。

返回顶部
顶部