你的数据库还能抢救–MySQL XA crash

2024年 7月 10日 90.7k 0

How to solve the problem) of MySQL XA crash

1、日志信息
2024-07-10T09:26:01.436957Z 0 [ERROR] [MY-011300] [Server] Plugin mysqlx reported: ‘Setup of socket: ‘/tmp/mysqlx.sock’ failed, another process with PID 1194 is using UNIX socket file’
2024-07-10T09:26:01.479220Z 0 [System] [MY-010229] [Server] Starting XA crash recovery…
2024-07-10T09:26:01.615077Z 0 [System] [MY-010232] [Server] XA crash recovery finished.
2024-07-10T09:26:01.719656Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2024-07-10T09:26:01.719716Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2024-07-10T09:26:01.725986Z 0 [ERROR] [MY-010259] [Server] Another process with pid 1194 is using unix socket file.
2024-07-10T09:26:01.726013Z 0 [ERROR] [MY-010268] [Server] Unable to setup unix socket lock file.
2024-07-10T09:26:01.726071Z 0 [ERROR] [MY-010119] [Server] Aborting
2024-07-10T09:26:03.274302Z 0 [System] [MY-010910] [Server] /mysql/app/mysql/bin/mysqld: Shutdown complete (mysqld 8.4.1) MySQL Community Server - GPL.
2024-07-10T09:26:03.274334Z 0 [System] [MY-015016] [Server] MySQL Server - end.
^C
2、检查
[root@mydb ~]# mysql
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (111)
[root@mydb ~]# ls -lsa /tmp/mysqlx.sock
0 srwxrwxrwx 1 mysql mysql 0 Jul 10 16:46 /tmp/mysqlx.sock
[root@mydb ~]# systemctl stop mysqld
[root@mydb ~]# ls -lsa /tmp/mysqlx.sock
0 srwxrwxrwx 1 mysql mysql 0 Jul 10 16:46 /tmp/mysqlx.sock
[root@mydb ~]# ls -lsa /tmp/mysql.sock
0 lrwxrwxrwx. 1 root root 22 Jun 29 17:24 /tmp/mysql.sock -> /mysql/data/mysql.sock
3、解决办法

[root@mydb ~]# rm -fr /tmp/mysqlx.sock
[root@mydb ~]# systemctl start mysqld
3、日志信息以及再次检查
[root@mydb ~]# log
2024-07-10T09:26:01.436957Z 0 [ERROR] [MY-011300] [Server] Plugin mysqlx reported: ‘Setup of socket: ‘/tmp/mysqlx.sock’ failed, another process with PID 1194 is using UNIX socket file’
2024-07-10T09:26:01.479220Z 0 [System] [MY-010229] [Server] Starting XA crash recovery…
2024-07-10T09:26:01.615077Z 0 [System] [MY-010232] [Server] XA crash recovery finished.
2024-07-10T09:26:01.719656Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2024-07-10T09:26:01.719716Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2024-07-10T09:26:01.725986Z 0 [ERROR] [MY-010259] [Server] Another process with pid 1194 is using unix socket file.
2024-07-10T09:26:01.726013Z 0 [ERROR] [MY-010268] [Server] Unable to setup unix socket lock file.
2024-07-10T09:26:01.726071Z 0 [ERROR] [MY-010119] [Server] Aborting
2024-07-10T09:26:03.274302Z 0 [System] [MY-010910] [Server] /mysql/app/mysql/bin/mysqld: Shutdown complete (mysqld 8.4.1) MySQL Community Server - GPL.
2024-07-10T09:26:03.274334Z 0 [System] [MY-015016] [Server] MySQL Server - end.
2024-07-10T09:27:49.748054Z 0 [System] [MY-015015] [Server] MySQL Server - start.
2024-07-10T09:27:50.035711Z 0 [System] [MY-010116] [Server] /mysql/app/mysql/bin/mysqld (mysqld 8.4.1) starting as process 1251
2024-07-10T09:27:50.047353Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2024-07-10T09:27:50.451021Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2024-07-10T09:27:51.016741Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2024-07-10T09:27:51.016815Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2024-07-10T09:27:51.080736Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: ‘::’ port: 33060, socket: /tmp/mysqlx.sock
2024-07-10T09:27:51.081003Z 0 [System] [MY-010931] [Server] /mysql/app/mysql/bin/mysqld: ready for connections. Version: ‘8.4.1’ socket: ‘/mysql/data/mysql.sock’ port: 3306 MySQL Community Server - GPL.
^C

[root@mydb ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.4.1 MySQL Community Server - GPL

Copyright © 2000, 2024, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql>
4、其他
引起MySQL XA crash的原因有多种

相关文章

Oracle如何使用授予和撤销权限的语法和示例
Awesome Project: 探索 MatrixOrigin 云原生分布式数据库
下载丨66页PDF,云和恩墨技术通讯(2024年7月刊)
社区版oceanbase安装
Oracle 导出CSV工具-sqluldr2
ETL数据集成丨快速将MySQL数据迁移至Doris数据库

发布评论