My MySQL install in k8s by helm. I don’t know when or why the database instance suddenly crashed and kept restarting.
The log is as follows:
...
2024-05-15T03:21:26.545811Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2024-05-15T03:21:27.384528Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2024-05-15T03:21:27.934871Z 4 [System] [MY-013381] [Server] Server upgrade from '80036' to '80036' started.
2024-05-15T03:22:24.222462Z 4 [ERROR] [MY-013178] [Server] Execution of server-side SQL statement '-- Deprecate spatial reference systems -- Deprecation must happen before new SRSs are added/updated since there -- typically are new SRSs with the same names. REPLACE INTO mysql.st_spatial_reference_systems(id, catalog_id, name, organization, organization_coordsys_id, definition, description) VALUES (6956, 1, 'VN-2000 / TM-3 zone 481 (6956 deprecated)', 'EPSG', 6956, 'PROJCS["VN-2000 / TM-3 zone 481",GEOGCS["VN-2000",DATUM["Vietnam 2000",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[-191.90441429,-39.30318279,-111.45032835,0.00928836,-0.01975479,0.00427372,0.252906278],AUTHORITY["EPSG","6756"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.017453292519943278,AUTHORITY["EPSG","9122"]],AXIS["Lat",NORTH],AXIS["Lon",EAST],AUTHORITY["EPSG","4756"]],PROJECTION["Transverse Mercator",AUTHORITY["EPSG","9807"]],PARAMETER["Latitude of natural origin",0,AUTHORITY["EPSG","8801"]],PARAMETER["Longitude of natural origin",102,AUTHORITY["EPSG","8802"]],PARAMETER["Scale factor at natural origin",0.9999,AUTHORITY["EPSG","8805"]],PARAMETER["False easting",0,AUTHORITY["EPSG","8806"]],PARAMETER["False northing",500000,AUTHORITY["EPSG","8807"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["E",EAST],AXIS["N",NORTH],AUTHORITY["EPSG","6956"]]', 'Deprecated since EPSG Dataset 9.3. Superseded by SRID 5896.'); ' failed with error code = 1205, error message = 'Lock wait timeout exceeded; try restarting transaction'.
2024-05-15T03:22:24.225721Z 0 [ERROR] [MY-013380] [Server] Failed to upgrade server.
2024-05-15T03:22:24.225751Z 0 [ERROR] [MY-010119] [Server] Aborting
2024-05-15T03:22:25.334661Z 0 [System] [MY-010910] [Server] /opt/bitnami/mysql/bin/mysqld: Shutdown complete (mysqld 8.0.36) Source distribution.
[root@localhost ~]# kubectl logs -n scd-stacs-5 mysql-0 -f
mysql 03:21:25.75 INFO ==>
mysql 03:21:25.75 INFO ==> Welcome to the Bitnami mysql container
mysql 03:21:25.75 INFO ==> Subscribe to project updates by watching https://github.com/bitnami/containers
mysql 03:21:25.76 INFO ==> Submit issues and feature requests at https://github.com/bitnami/containers/issues
mysql 03:21:25.76 INFO ==>
mysql 03:21:25.76 INFO ==> ** Starting MySQL setup **
mysql 03:21:25.82 INFO ==> Validating settings in MYSQL_*/MARIADB_* env vars
mysql 03:21:25.82 INFO ==> Initializing mysql database
mysql 03:21:25.84 WARN ==> The mysql configuration file '/opt/bitnami/mysql/conf/my.cnf' is not writable. Configurations based on environment variables will not be applied for this file.
mysql 03:21:25.84 INFO ==> Using persisted data
mysql 03:21:25.93 INFO ==> Running mysql_upgrade
mysql 03:21:25.94 INFO ==> Starting mysql in background
2024-05-15T03:21:26.530649Z 0 [Warning] [MY-011068] [Server] The syntax 'skip_slave_start' is deprecated and will be removed in a future release. Please use skip_replica_start instead.
2024-05-15T03:21:26.530826Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
2024-05-15T03:21:26.530865Z 0 [System] [MY-010116] [Server] /opt/bitnami/mysql/bin/mysqld (mysqld 8.0.36) starting as process 46
2024-05-15T03:21:26.545811Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2024-05-15T03:21:27.384528Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2024-05-15T03:21:27.934871Z 4 [System] [MY-013381] [Server] Server upgrade from '80036' to '80036' started.
2024-05-15T03:22:24.222462Z 4 [ERROR] [MY-013178] [Server] Execution of server-side SQL statement '-- Deprecate spatial reference systems -- Deprecation must happen before new SRSs are added/updated since there -- typically are new SRSs with the same names. REPLACE INTO mysql.st_spatial_reference_systems(id, catalog_id, name, organization, organization_coordsys_id, definition, description) VALUES (6956, 1, 'VN-2000 / TM-3 zone 481 (6956 deprecated)', 'EPSG', 6956, 'PROJCS["VN-2000 / TM-3 zone 481",GEOGCS["VN-2000",DATUM["Vietnam 2000",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[-191.90441429,-39.30318279,-111.45032835,0.00928836,-0.01975479,0.00427372,0.252906278],AUTHORITY["EPSG","6756"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.017453292519943278,AUTHORITY["EPSG","9122"]],AXIS["Lat",NORTH],AXIS["Lon",EAST],AUTHORITY["EPSG","4756"]],PROJECTION["Transverse Mercator",AUTHORITY["EPSG","9807"]],PARAMETER["Latitude of natural origin",0,AUTHORITY["EPSG","8801"]],PARAMETER["Longitude of natural origin",102,AUTHORITY["EPSG","8802"]],PARAMETER["Scale factor at natural origin",0.9999,AUTHORITY["EPSG","8805"]],PARAMETER["False easting",0,AUTHORITY["EPSG","8806"]],PARAMETER["False northing",500000,AUTHORITY["EPSG","8807"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["E",EAST],AXIS["N",NORTH],AUTHORITY["EPSG","6956"]]', 'Deprecated since EPSG Dataset 9.3. Superseded by SRID 5896.'); ' failed with error code = 1205, error message = 'Lock wait timeout exceeded; try restarting transaction'.
2024-05-15T03:22:24.225721Z 0 [ERROR] [MY-013380] [Server] Failed to upgrade server.
2024-05-15T03:22:24.225751Z 0 [ERROR] [MY-010119] [Server] Aborting
2024-05-15T03:22:25.334661Z 0 [System] [MY-010910] [Server] /opt/bitnami/mysql/bin/mysqld: Shutdown complete (mysqld 8.0.36) Source distribution.
I attempted to transfer the data files to another location for recovery, but the error still persists, and the database can no longer start successfully. I’m not sure if it is related to the storage. I am using a storage class, and the storage class is provided by nfs-provisioner.
小维江湖 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.