mysqlha-0 running 但是mysqlha-1初始化crash
mysqlha-0 2/2 Running 0 26s mysqlha-1 0/2 Init:CrashLoopBackOff 1 13s [root@master helm]# kubectl logs mysqlha-0 -c xtrabackup
- echo 'Waiting for mysqld to be ready (accepting connections)'
- mysql -hlocalhost -e 'SELECT 1' Waiting for mysqld to be ready (accepting connections) ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
- sleep 5
- mysql -hlocalhost -e 'SELECT 1' ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
- sleep 5
但是实际 kubectl exec -it mysqlha-0 -c mysql bash root@mysqlha-0:/# mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 25 Server version: 5.7.13-log MySQL Community Server (GPL)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
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> exit Bye root@mysqlha-0:/# mysql -hlocalhost Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 27 Server version: 5.7.13-log MySQL Community Server (GPL)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
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> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | sys | +--------------------+ 4 rows in set (0.04 sec)
mysql> exit Bye
想知道是哪里的问题引起的?