Starting MySQL.Manager of pid-file quit without updating fi[FAILED]报错处理
LNMP安装完毕后,MySQL启动时报错,log如下:
This crash occured while the server was calling initgroups(). This is
often due to the use of a mysqld that is statically linked against
glibc and configured to use LDAP in /etc/nsswitch.conf.
You will need to either upgrade to a version of glibc that does not
have this problem (2.3.4 or later when used with nscd),
disable LDAP in your nsswitch.conf, or use a mysqld that is not statically linked.
231108 12:33:01 mysqld_safe mysqld from pid file /usr/local/mysql/var/xadns.pid ended
something is definitely wrong and this may fail.
key_buffer_size=0
read_buffer_size=262144
max_used_connections=0
max_threads=500
thread_count=0
connection_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 389207 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0 thread_stack 0x40000
[0x758059]
[0x5a255c]
[0x628c60]
/lib/x86_64-linux-gnu/libnss_systemd.so.2(+0xf2e2) [0x7f4fbbc072e2]
/lib/x86_64-linux-gnu/libnss_systemd.so.2(+0x145ff) [0x7f4fbbc0c5ff]
/lib/x86_64-linux-gnu/libnss_systemd.so.2(+0x9701) [0x7f4fbbc01701]
/lib/x86_64-linux-gnu/libnss_systemd.so.2(+0x25f88) [0x7f4fbbc1df88]
/lib/x86_64-linux-gnu/libnss_systemd.so.2(+0x9a3f) [0x7f4fbbc01a3f]
/lib/x86_64-linux-gnu/libnss_systemd.so.2(+0x3143a) [0x7f4fbbc2943a]
[0x87b56a]
[0x87b9be]
[0x87bbed]
[0x4c427d]
[0x4049e8]
[0x816821]
[0x40fbba]
分析:
在Debian9/10中安装部署MySQL5.1等较低版本中回出现mysqld glibc静态链接配置问题。
解决:
编辑文件/etc/nsswitch.conf注释掉group: files systemd
cat /etc/nsswitch.conf
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
passwd: files systemd
#group: files systemd
shadow: files
gshadow: files
hosts: files dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
清理文件,重新初始化MySQL
cd /usr/local/mysql/var
rm * -rf
/usr/local/mysql/bin/mysql_install_db --user=mysql
启动MySQL
/etc/init.d/mysql start
至此,问题解决。
Tag标签:「mysql libnss_systemd nsswitch」更新时间:「2023-11-08 14:03:52」阅读次数:「1655」