Percona-Server-5.7.16 启动错误

时间:2021-09-10 15:21:52
基于:percona-server-5.7.16
启动报错:
 [root@monitor mysql]# ./bin/mysqld_safe --defaults-file=/data/config/my4002.cnf --user=mysql
 mysqld_safe Adding '/data/Percona-Server-5.7.17-11-Linux.x86_64.ssl101/lib/mysql/libjemalloc.so.1' to LD_PRELOAD for mysqld
 mysqld_safe ld_preload libraries can only be loaded from system directories (/usr/lib64, /usr/lib, /usr/local/mysql/lib)
解决方式:
参考:MySQL5.7官方手册:mysqld_safe命令: --malloc-lib=[lib_name]
配置文件中添加:
[mysqld_safe]
malloc-lib=/usr/lib64/libjemalloc.so.1
注意:报错内容给出的 3个路径中:/usr/local/mysql/lib ,是指:${myql_basedir}/lib,实际上,这个目录下面是有:libjemalloc.so.1的,但是不识别。就链接到/usr/lib64下面了。
参考:tcmalloc和jemalloc的区别: