单机多服务启动失败,my.cnf 和 greatsql@.service 配置文件在后面,请教cnf文件是否正确?该如何处理 [root@c8-sql clocal]# systemctl start greatsql@mgr01 Job for greatsql@mgr01.service failed because the control process exited with error code. See "systemctl status greatsql@mgr01.service" and "journalctl -xe" for details. [root@c8-sql local]# systemctl status greatsql@mgr01.service ● greatsql@mgr01.service - GreatSQL Server Loaded: loaded (/usr/lib/systemd/system/greatsql@.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since Sun 2024-02-18 16:47:25 CST; 26s ago Docs: man:mysqld(8) http://dev.mysql.com/doc/refman/en/using-systemd.html Process: 18079 ExecStartPre=/usr/local/GreatSQL-8.0.32-24-Linux-glibc2.28-x86_64/bin/mysqld_pre_systemd mgr01 (code=exited, status=203/EXEC) Feb 18 16:47:25 c8-sql systemd[1]: greatsql@mgr01.service: Control process exited, code=exited status=203 Feb 18 16:47:25 c8-sql systemd[1]: greatsql@mgr01.service: Failed with result 'exit-code'. Feb 18 16:47:25 c8-sql systemd[1]: Failed to start GreatSQL Server. Feb 18 16:47:25 c8-sql systemd[1]: greatsql@mgr01.service: Service RestartSec=100ms expired, scheduling restart. Feb 18 16:47:25 c8-sql systemd[1]: greatsql@mgr01.service: Scheduled restart job, restart counter is at 5. Feb 18 16:47:25 c8-sql systemd[1]: Stopped GreatSQL Server. Feb 18 16:47:25 c8-sql systemd[1]: greatsql@mgr01.service: Start request repeated too quickly. Feb 18 16:47:25 c8-sql systemd[1]: greatsql@mgr01.service: Failed with result 'exit-code'. Feb 18 16:47:25 c8-sql systemd[1]: Failed to start GreatSQL Server. my.cnf配置文件 [root@c8-sql local]# cat /etc/my.cnf [mysql] socket=/var/lib/mysql/mysql.sock [mysqld@mgr01] user=mysql datadir=/data/GreatSQL/mgr01 socket=/data/GreatSQL/mgr01/mysql.sock port=3306 server_id=33061 log-error=/data/GreatSQL/mgr01/error.log pid-file=/var/run/mysqld/mysqld.pid 服务文件 [root@c8-sql local]# cat /lib/systemd/system/greatsql\@.service [Unit] Description=GreatSQL Server Documentation=man:mysqld(8) Documentation=http://dev.mysql.com/doc/refman/en/using-systemd.html After=network.target After=syslog.target [Install] WantedBy=multi-user.target [Service] # 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-25-Linux-glibc2.28-x86_64/bin/mysqld_pre_systemd #ExecStart=/usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-x86_64/bin/mysqld $MYSQLD_OPTS #for multi instance ExecStartPre=/usr/local/GreatSQL-8.0.32-24-Linux-glibc2.28-x86_64/bin/mysqld_pre_systemd %I ExecStart=/usr/local/GreatSQL-8.0.32-24-Linux-glibc2.28-x86_64/bin/mysqld --defaults-group-suffix=@%I $MYSQLD_OPTS EnvironmentFile=-/etc/sysconfig/mysql LimitNOFILE = 10000 Restart=on-failure RestartPreventExitStatus=1 Environment=MYSQLD_PARENT_PID=1 PrivateTmp=false PrivateTmp=false |
yejr
2024-2-19 12:06:20
| |
lb8125
2024-2-19 13:49:09
| ||
yejr
2024-2-19 16:22:49
| ||
lb8125
2024-2-27 21:32:48
| ||
yejr
2024-2-28 09:14:00
| ||
合作电话:010-64087828
社区邮箱:greatsql@greatdb.com