database - 安装后我无法启动 mariadb.service

标签 database centos mariadb centos7

我在我的 CentOS7 中安装了 mariadb,“systemctl start mariadb”命令不起作用。控制台输出是这个 --> “Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.

[root@centos ~]# journalctl -xe
 1월 21 00:31:34 centos systemd[1]: mariadb.service failed.
 1월 21 00:31:34 centos polkitd[828]: Unregistered Authentication Agent for unix-process:3046:129841 (system bus name :1
 1월 21 00:31:53 centos fprintd[3001]: No devices in use, exit
 1월 21 00:32:07 centos polkitd[828]: Registered Authentication Agent for unix-process:3087:133140 (system bus name :1.1
 1월 21 00:32:07 centos systemd[1]: Starting MariaDB 10.1.30 database server...
-- Subject: Unit mariadb.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit mariadb.service has begun starting up.
 1월 21 00:32:07 centos mysqld[3110]: /usr/sbin/mysqld: error while loading shared libraries: libjemalloc.so.1: cannot o
 1월 21 00:32:07 centos systemd[1]: mariadb.service: main process exited, code=exited, status=127/n/a
 1월 21 00:32:07 centos systemd[1]: Failed to start MariaDB 10.1.30 database server.
-- Subject: Unit mariadb.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit mariadb.service has failed.
-- 
-- The result is failed.
 1월 21 00:32:07 centos systemd[1]: Unit mariadb.service entered failed state.
 1월 21 00:32:07 centos systemd[1]: mariadb.service failed.
 1월 21 00:32:07 centos polkitd[828]: Unregistered Authentication Agent for unix-process:3087:133140 (system bus name :1
lines 3201-3223/3223 (END)

我搜索了很长时间来解决这个问题,我找不到合适的解决方案。
并且/var/log/mariadb 目录不存在。

我该如何解决这个问题?请帮我!

(更新)
[root@kyun2centos ~]# journalctl -xe|grep 'error'
 1월 23 16:47:12 kyun2centos gnome-settings-[2077]: g_task_return_error: assertion 'error != NULL' failed
 1월 23 20:30:53 kyun2centos mysqld[3754]: /usr/sbin/mysqld: error while loading shared libraries: libjemalloc.so.1: cannot open shared object file: No such file or directory
 1월 23 20:33:11 kyun2centos mysqld[3841]: 2018-01-23 20:33:11 140616961231104 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
 1월 23 20:33:32 kyun2centos mysqld[3964]: 2018-01-23 20:33:32 139707756554496 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
 1월 23 20:42:37 kyun2centos mysqld[4274]: 2018-01-23 20:42:37 140639461787904 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
 1월 23 20:43:12 kyun2centos mysqld[4365]: 2018-01-23 20:43:12 140563394230528 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
 1월 23 20:48:04 kyun2centos mysqld[4553]: 2018-01-23 20:48:04 139807531911424 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
 1월 23 20:50:04 kyun2centos mysqld[4654]: 2018-01-23 20:50:04 140253162838272 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
 1월 23 20:57:30 kyun2centos mysqld[4901]: 2018-01-23 20:57:30 140003728230656 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist

最佳答案

它表明缺少库。所以运行

yum install libaio

yum 将帮助您安装和配置它,或者您可以访问 website下载最新的 rpm 包并手动安装。

关于database - 安装后我无法启动 mariadb.service,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48359153/

相关文章:

mongodb - 命令未找到 : mongoexport

python - Django:如何模拟慢速服务器?

database - 预测下一个自动插入的行 ID (SQLite)

mysql - Centos - yum 更新因依赖项引发后缀错误

r - 在 Linux 上的 Azure 上部署 R (centos 8.2.2004)

linux - centos中的阿拉伯字符

mysql - 在 Windows 操作系统中启用 TokUdb 插件到 MySQL 或 MariaDb

sql - 获取 mysql 条目的列

mysql - MariaDB/MySQL 将 DEFAULT NULL 添加到列定义中,如何更改?

fedora - 如何在 Fedora 19 中安装 MariaDB?