龙芯服务器安装GreatSQL时失败
在龙芯服务器上使用二进制包方式安装greatsql时,报错。信息如下1、greatsql安装包版本:GreatSQL-8.0.32-24-loongnix-glibc2.28-loongarch64.tar.xz
2、服务器信息:Linux localhost.localdomain 4.19.90-52.22.v2207.a.ky10.loongarch64 #1 SMP Tue Mar 14 11:18:26 CST 2023 loongarch64 loongarch64 loongarch64 GNU/Linux
3、报错信息
# systemctl status greatsql.service
● greatsql.service - GreatSQL Server
Loaded: loaded (/usr/lib/systemd/system/greatsql.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2023-12-28 12:23:22 CST; 1h 22min ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 112472 ExecStartPre=/usr/local/GreatSQL-8.0.32-24-loongnix-glibc2.28-loongarch64/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Process: 112510 ExecStart=/usr/local/GreatSQL-8.0.32-24-loongnix-glibc2.28-loongarch64/bin/mysqld $MYSQLD_OPTS (code=exited, status=1/FAILURE)
Main PID: 112510 (code=exited, status=1/FAILURE)
Status: "Server shutdown complete"
12月 28 12:23:20 localhost.localdomain systemd: Starting GreatSQL Server...
12月 28 12:23:22 localhost.localdomain systemd: greatsql.service: Main process exited, code=exited, status=1/FAILURE
12月 28 12:23:22 localhost.localdomain systemd: greatsql.service: Failed with result 'exit-code'.
12月 28 12:23:22 localhost.localdomain systemd: Failed to start GreatSQL Server.
# journalctl -xe
--
-- The process' exit code is 'exited' and its exit status is 1.
12月 28 12:23:22 localhost.localdomain systemd: greatsql.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The unit greatsql.service has entered the 'failed' state with result 'exit-code'.
12月 28 12:23:22 localhost.localdomain systemd: Failed to start GreatSQL Server.
-- Subject: greatsql.service 单元已失败
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- greatsql.service 单元已失败。
--
-- 结果为“failed”。
12月 28 12:23:24 localhost.localdomain systemd: kylin-kms-activation.service: Service RestartSec=30s expired, scheduling restart.
12月 28 12:23:24 localhost.localdomain systemd: kylin-kms-activation.service: Scheduled restart job, restart counter is at 1855.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Automatic restarting of the unit kylin-kms-activation.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
12月 28 12:23:24 localhost.localdomain systemd: Stopped run kylin_kms_daemon at boot time.
-- Subject: kylin-kms-activation.service 单元已结束停止操作
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- kylin-kms-activation.service 单元已结束停止操作。
12月 28 12:23:24 localhost.localdomain systemd: Started run kylin_kms_daemon at boot time.
-- Subject: kylin-kms-activation.service 单元已结束启动
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- kylin-kms-activation.service 单元已结束启动。
--
-- 启动结果为“done”。
请您附带上greatsql.service文件,以及您机器的glibc版本,如果有错误日志请提供错误日志谢谢
以及您参考的文档是哪份也请提供下谢谢
KAiTO 发表于 2023-12-28 14:12
请您附带上greatsql.service文件,以及您机器的glibc版本,如果有错误日志请提供错误日志谢谢
以及您参考的 ...
glibc版本:ldd (GNU libc) 2.28
error.log信息详见附件
greatservice配置:
Description=GreatSQL Server
Documentation=man:mysqld(8)
Documentation=http://dev.mysql.com/doc/refman/en/using-systemd.html
After=network.target
After=syslog.target
WantedBy=multi-user.target
# some limits
# file size
LimitFSIZE=infinity
# cpu time
LimitCPU=infinity
# virtual memory size
LimitAS=infinity
# open files
LimitNOFILE=65535
# processes/threads
LimitNPROC=65535
# locked memory
LimitMEMLOCK=infinity
# total threads (user+kernel)
TasksMax=infinity
TasksAccounting=false
User=mysql
Group=mysql
#如果是GreatSQL 5.7版本,此处需要改成simple模式,否则可能服务启用异常
#如果是GreatSQL 8.0版本则可以使用notify模式
#Type=simple
Type=notify
TimeoutSec=0
PermissionsStartOnly=true
ExecStartPre=/usr/local/GreatSQL-8.0.32-24-loongnix-glibc2.28-loongarch64/bin/mysqld_pre_systemd
ExecStart=/usr/local/GreatSQL-8.0.32-24-loongnix-glibc2.28-loongarch64/bin/mysqld $MYSQLD_OPTS
EnvironmentFile=-/etc/sysconfig/mysql
Restart=on-failure
RestartPreventExitStatus=1
Environment=MYSQLD_PARENT_PID=1
PrivateTmp=false
wanglubin 发表于 2023-12-28 14:29
glibc版本:ldd (GNU libc) 2.28
error.log信息详见附件
greatservice配置:
这个错误通常是由于GreatSQL无法找到有效的数据目录导致的。可能的原因是在安装GreatSQL时指定了不正确的数据目录或者数据目录不可用,常规的解决方法就是:
1.确认GreatSQL目录是否存在
2.检查GreatSQL目录权限是否正常,通常确保是MySQL用户有该目录的权限
3.确保GreatSQL目录为空,因为初始化失败可能导致目录中还有数据,如果重新初始化要确保目录为空
4.如果GreatSQL目录不存在,可以尝试手动创建数据目录
5.如果GreatSQL目录存在但是不可用,可以尝试在指定另一个数据目录或重新安装GreatSQL 这里和你error log中的路径好像对不上
ExecStartPre=/usr/local/GreatSQL-8.0.32-24-loongnix-glibc2.28-loongarch64/bin/mysqld_pre_systemd
ExecStart=/usr/local/GreatSQL-8.0.32-24-loongnix-glibc2.28-loongarch64/bin/mysqld $MYSQLD_OPTS 此问题已解决,清空数据目录后重新启动,启动成功
关联公众号文章:https://mp.weixin.qq.com/s/mdnUeHfy-KfH-hey3M5_zA
官答丨初始化GreatSQL找不到数据目录或初始化数据字典失败
修改状态为 已解决
页:
[1]