GreatSQL-8.0.32-24 二进制包安装
按照文档 3-quick-start/3-2-quick-start-with-tarball.md · 万里数据库/GreatSQL-Manual - Gitee.com ,下载GreatSQL-8.0.32-24-Linux-glibc2.17-x86_64.tar.xz 安装到Centos 7 中,由于习惯使用mysql.server 启动,安装完成后发现support-files 中该文件已经不存在,复制8.0.25 的mysql.server 到bin 中,执行mysql.server start如下错误
20230616_16:02:37$ cp ../mysql20230616/bin/mysql.server bin/
20230616_16:03:07$ mysql.server start
20230616_16:03:07/usr/local/mysql/bin/my_print_defaults: /usr/local/ssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/mysql/bin/my_print_defaults)
20230616_16:03:07/usr/local/mysql/bin/mysql.server: line 259: cd: /usr/local/GreatSQL-8.0.25-16-Linux-glibc2.17-x86_64: No such file or directory
20230616_16:03:07Starting MySQL (Percona Server) ERROR! Couldn't find MySQL server (/usr/local/GreatSQL-8.0.25-16-Linux-glibc2.17-x86_64/bin/mysqld_safe)修改mysql.server
basedir=/usr/local/mysql
datadir=/home/manager/mysql_data继续
$ mysql.server start
/usr/local/mysql/bin/my_print_defaults: /usr/local/ssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/mysql/bin/my_print_defaults)
Starting MySQL (Percona Server)./usr/local/mysql/bin/my_print_defaults: /usr/local/ssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/mysql/bin/my_print_defaults)
/usr/local/mysql/bin/my_print_defaults: /usr/local/ssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/mysql/bin/my_print_defaults)
. ERROR! The server quit without updating PID file (/home/manager/mysql_data/server57.pid).使用systemd 方式启动
sed -i 's/GreatSQL-8.0.32-24-Linux-glibc2.17-x86_64/mysql/' mysqld_pre_systemd
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=manager
Group=manager
#如果是GreatSQL 5.7版本,此处需要改成simple模式,否则可能服务启用异常
#如果是GreatSQL 8.0版本则可以使用notify模式
#Type=simple
Type=notify
TimeoutSec=0
PermissionsStartOnly=true
ExecStartPre=/usr/local/mysql/bin/mysqld_pre_systemd
ExecStart=/usr/local/mysql/bin/mysqld $MYSQLD_OPTS
EnvironmentFile=-/etc/sysconfig/mysql
LimitNOFILE = 10000
Restart=on-failure
RestartPreventExitStatus=1
Environment=MYSQLD_PARENT_PID=1
PrivateTmp=false错误如下
Jun 16 16:33:56 server57 mysqld_pre_systemd: /usr/local/mysql/bin/my_print_defaults: /usr/local/ssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/mysql/bin/my_print_defaults)
Jun 16 16:33:56 server57 polkitd: Unregistered Authentication Agent for unix-process:30427:2974284038 (system bus name :1.117215, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
Jun 16 16:33:56 server57 mysqld_pre_systemd: /usr/local/mysql/bin/my_print_defaults: /usr/local/ssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/mysql/bin/my_print_defaults)
Jun 16 16:33:56 server57 mysqld_pre_systemd: /usr/local/mysql/bin/my_print_defaults: /usr/local/ssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/mysql/bin/my_print_defaults)
Jun 16 16:33:56 server57 mysqld_pre_systemd: /usr/local/mysql/bin/my_print_defaults: /usr/local/ssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/mysql/bin/my_print_defaults)
Jun 16 16:33:56 server57 mysqld_pre_systemd: install: invalid user ‘mysql’
Jun 16 16:33:56 server57 systemd: greatsql.service: control process exited, code=exited status=1
Jun 16 16:33:56 server57 systemd: Failed to start GreatSQL Server.
-- Subject: Unit greatsql.service has failed建立软连接后启动成功
# find / -name libcrypto.so.10
/usr/lib64/libcrypto.so.10
/usr/local/mysql/lib/libcrypto.so.10
/usr/local/mysql/lib/private/libcrypto.so.10
# ll
total 22456
drwxr-xr-x 2 root root 39 Jul82022 engines-1.1
-rw-r--r-- 1 root root 11605090 Jul82022 libcrypto.a
lrwxrwxrwx 1 root root 16 Jul82022 libcrypto.so -> libcrypto.so.1.1
lrwxrwxrwx 1 root root 16 Jun 16 17:31 libcrypto.so.10 -> libcrypto.so.1.1
-rwxr-xr-x 1 root root6213512 Jul82022 libcrypto.so.1.1
-rw-r--r-- 1 root root3484474 Jul82022 libssl.a
lrwxrwxrwx 1 root root 13 Jul82022 libssl.so -> libssl.so.1.1
-rwxr-xr-x 1 root root1685408 Jul82022 libssl.so.1.1
drwxr-xr-x 2 root root 61 Jul82022 pkgconfig
# rm -rf libcrypto.so
# ln -s /usr/local/mysql/lib/libcrypto.so.10 libcrypto.so我这环境是在8.0.25 上做原地升级,不知道统一个机器25 和32 为啥表现不一样?32 对openssl 版本有要求?
几个建议:
1. 建议用systemd来管理GreatSQL服务,详情参考
https://greatsql.cn/docs/8032/user-manual/4-install-guide/4-3-install-with-tarball.html
2. GreatSQL 8.0.32的编译参数和8.0.25确实不同,对操作系统的openssl依赖方式也不同
这时候需要手动加软链接,或者把GreatSQL的lib目录加到ldconfig可识别的路径里,例如修改 /etc/ld.so.conf ,加入一行:
/usr/local/GreatSQL-8.0.32-24-Linux-glibc2.17-x86_64/lib yejr 发表于 2023-6-17 21:34
几个建议:
1. 建议用systemd来管理GreatSQL服务,详情参考
https://greatsql.cn/docs/8032/user-manual/4- ...
本机升级openssl3 后如果 把greatsql里的lib 放到 /etc/ld.so.conf 中,上面的问题依然会存在,需要再启动greatsql时只加载greatsql二进制包中的lib,或者是能直接兼容。 mlovewt 发表于 2023-7-28 14:17
本机升级openssl3 后如果 把greatsql里的lib 放到 /etc/ld.so.conf 中,上面的问题依然会存在,需要再启 ...
/etc/ld.so.conf 中内容
include ld.so.conf.d/*.conf
/usr/local/mysql/lib
/usr/local/openssl/lib
把 /usr/local/openssl/lib 去掉是可以启动的 本帖最后由 mlovewt 于 2023-7-28 14:33 编辑
mlovewt 发表于 2023-7-28 14:19
/etc/ld.so.conf 中内容
把 /usr/local/openssl/lib 去掉是可以启动的
解决了
cat >> /etc/sysconfig/mysql << EOF
LD_PRELOAD=/usr/lib64/libjemalloc.so:/usr/local/mysql/lib/libcrypto.so.10:/usr/local/mysql/lib/libssl.so.10:/usr/local/mysql/lib/libcrypto.so
THP_SETTING=never
EOF
初始化后启动时libjemalloc.so 后面追加上这三个就可以启动,初始化仍然出错
Jul 28 14:30:57 docker-base mysqld_pre_systemd: /usr/local/mysql/bin/my_print_defaults: /usr/local/openssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/mysql/bin/my_print_defaults)
Jul 28 14:30:57 docker-base mysqld_pre_systemd: /usr/local/mysql/bin/my_print_defaults: /usr/local/openssl/lib/libcrypto.so: version `OPENSSL_1.0.1_EC' not found (required by /usr/local/mysql/lib/libssl.so.10)
Jul 28 14:30:57 docker-base mysqld_pre_systemd: /usr/local/mysql/bin/my_print_defaults: /usr/local/openssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/mysql/lib/libssl.so.10)
Jul 28 14:30:57 docker-base mysqld_pre_systemd: /usr/local/mysql/bin/my_print_defaults: /usr/local/openssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/mysql/bin/my_print_defaults)
Jul 28 14:30:57 docker-base mysqld_pre_systemd: /usr/local/mysql/bin/my_print_defaults: /usr/local/openssl/lib/libcrypto.so: version `OPENSSL_1.0.1_EC' not found (required by /usr/local/mysql/lib/libssl.so.10)
Jul 28 14:30:57 docker-base mysqld_pre_systemd: /usr/local/mysql/bin/my_print_defaults: /usr/local/openssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/mysql/lib/libssl.so.10)
Jul 28 14:30:57 docker-base mysqld_pre_systemd: /usr/local/mysql/bin/my_print_defaults: /usr/local/openssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/mysql/bin/my_print_defaults)
Jul 28 14:30:57 docker-base mysqld_pre_systemd: /usr/local/mysql/bin/my_print_defaults: /usr/local/openssl/lib/libcrypto.so: version `OPENSSL_1.0.1_EC' not found (required by /usr/local/mysql/lib/libssl.so.10)
Jul 28 14:30:57 docker-base mysqld_pre_systemd: /usr/local/mysql/bin/my_print_defaults: /usr/local/openssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/mysql/lib/libssl.so.10)
Jul 28 14:30:57 docker-base mysqld_pre_systemd: /usr/local/mysql/bin/my_print_defaults: /usr/local/openssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/mysql/bin/my_print_defaults)
Jul 28 14:30:57 docker-base mysqld_pre_systemd: /usr/local/mysql/bin/my_print_defaults: /usr/local/openssl/lib/libcrypto.so: version `OPENSSL_1.0.1_EC' not found (required by /usr/local/mysql/lib/libssl.so.10)
Jul 28 14:30:57 docker-base mysqld_pre_systemd: /usr/local/mysql/bin/my_print_defaults: /usr/local/openssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/mysql/lib/libssl.so.10)
Jul 28 14:30:57 docker-base systemd: greatsql.service: main process exited, code=exited, status=1/FAILURE
Jul 28 14:30:57 docker-base systemd: Failed to start GreatSQL Server.
-- Subject: Unit greatsql.service has failed
mlovewt 发表于 2023-7-28 14:19
/etc/ld.so.conf 中内容
把 /usr/local/openssl/lib 去掉是可以启动的
那就在ld.so.conf 里把 /usr/local/openssl/lib 去掉呗,为啥一定要加载呢
页:
[1]