HI EVERYONE! i have a problem wwhen i restart my system ( i have 2 node of Percona XtraDB Cluster 5.7, rehl 7.9 enterprise). i can't start mysql again

here is my config of my.cnf

=============================
#
!includedir /etc/my.cnf.d/
!includedir /etc/percona-xtradb-cluster.conf.d/
[mysqld]
wait_timeout = 31536000
max_allowed_packet=1024M
lower_case_table_names=1
wsrep_provider=/usr/lib64/galera3/libgalera_smm.so
wsrep_cluster_name=democluster
wsrep_cluster_address=gcomm://192.168.149.186,192.168.149.182
wsrep_node_name=DB1
wsrep_node_address=192.168.149.186
wsrep_sst_method=xtrabackup-v2
wsrep_sst_auth=admin:Admin@123
pxc_strict_mode=ENFORCING
binlog_format=ROW
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2
[mysqldump]
max_allowed_packet=1024M
[client]
socket = /var/run/mysql/mysql.sock
~
~
and this is log check.
==========================
Sep 14 19:57:06 localhost.localdomain mysql-systemd[9171]: State transfer in progress, setting sleep higher
Sep 14 19:57:07 localhost.localdomain mysqld_safe[9170]: 2021-09-15T02:57:07.261459Z mysqld_safe Logging to '/var/log/mysqld.log'.
Sep 14 19:57:07 localhost.localdomain mysqld_safe[9170]: 2021-09-15T02:57:07.264735Z mysqld_safe Logging to '/var/log/mysqld.log'.
Sep 14 19:57:07 localhost.localdomain mysqld_safe[9170]: 2021-09-15T02:57:07.295892Z mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Sep 14 19:57:07 localhost.localdomain mysqld_safe[9170]: 2021-09-15T02:57:07.306857Z mysqld_safe Skipping wsrep-recover for a1da470f-153d-11ec-834a-b7075e945411:1777 pair
Sep 14 19:57:07 localhost.localdomain mysqld_safe[9170]: 2021-09-15T02:57:07.308612Z mysqld_safe Assigning a1da470f-153d-11ec-834a-b7075e945411:1777 to wsrep_start_position
Sep 14 19:57:12 localhost.localdomain systemd[1]: mysql@bootstrap.service: main process exited, code=exited, status=1/FAILURE
Sep 14 19:57:16 localhost.localdomain mysql-systemd[9171]: /usr/bin/mysql-systemd: line 140: kill: (9170) - No such process
Sep 14 19:57:16 localhost.localdomain mysql-systemd[9171]: ERROR! mysqld_safe with PID 9170 has already exited: FAILURE
Sep 14 19:57:16 localhost.localdomain systemd[1]: mysql@bootstrap.service: control process exited, code=exited status=1
Sep 14 19:57:16 localhost.localdomain mysql-systemd[9781]: WARNING: mysql pid file /var/run/mysqld/mysqld.pid empty or not readable
Sep 14 19:57:16 localhost.localdomain mysql-systemd[9781]: ERROR! mysql already dead
Sep 14 19:57:16 localhost.localdomain systemd[1]: mysql@bootstrap.service: control process exited, code=exited status=2
Sep 14 19:57:16 localhost.localdomain mysql-systemd[9811]: WARNING: mysql pid file /var/run/mysqld/mysqld.pid empty or not readable
Sep 14 19:57:16 localhost.localdomain mysql-systemd[9811]: WARNING: mysql may be already dead
Sep 14 19:57:16 localhost.localdomain systemd[1]: Failed to start Percona XtraDB Cluster with config /etc/sysconfig/mysql.bootstrap.
-- Subject: Unit mysql@bootstrap.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql@bootstrap.service has failed.
--
-- The result is failed.
Sep 14 19:57:16 localhost.localdomain systemd[1]: Unit mysql@bootstrap.service entered failed state.
Sep 14 19:57:16 localhost.localdomain systemd[1]: mysql@bootstrap.service failed.
Sep 14 19:57:16 localhost.localdomain polkitd[692]: Unregistered Authentication Agent for unix-process:9122:230282 (system bus name :1.44, object path /org/freedesktop/PolicyKit1
==================================

ANYONE have any idea for this proplem? THANK ALL!

2 Likes

Hello,
Need to see your error logs.

2 Likes

Hello,

Could you check the permissions of the /var/run/mysqld/ directory and the mysqld.pid file?

ls -ltra /var/run/mysqld/

If the file exists and its owner is NOT mysql, delete mysqld.pid and try to startup again the db service.

If that doesn’t work send us the file /var/log/mysqld.log, as Matthew said.

Be careful, the my.cnf file also loads the contents of

!includedir /etc/my.cnf.d/
!includedir /etc/percona-xtradb-cluster.conf.d/

These directories may have other configuration files that you are not considering. For example by changing the content of the pid_file variable.

Best. E.

1 Like