After upgrading mysql the server can not start?
Upgrade
apt update && apt upgrade
8.0.35
=> 8.0.36
OS: Debian bookworm
error
Tablespace 123588, name 'sys/sys_config', file './sys/sys_config.ibd' is missing!
In the datadir there is no directory called sys
.
Directories in datadir folder
#innodb_redo
#innodb_temp
database1
database2
mysql
I have several servers running mysql 8.0.35
and none of them have a sys
folder in the datadir
About a year ago I upgraded from mysql 5.7
to mysql 8.0
error log
2024-03-25T21:00:02.095623Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.36) starting as process 1609948
2024-03-25T21:00:02.115017Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2024-03-25T21:00:03.243409Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2024-03-25T21:00:03.423835Z 1 [Warning] [MY-012351] [InnoDB] Tablespace 123588, name 'sys/sys_config', file './sys/sys_config.ibd' is missing!
2024-03-25T21:00:04.224441Z 4 [System] [MY-013381] [Server] Server upgrade from '80035' to '80036' started.
2024-03-25T21:00:22.456919Z 4 [ERROR] [MY-012592] [InnoDB] Operating system error number 2 in a file operation.
2024-03-25T21:00:22.457003Z 4 [ERROR] [MY-012593] [InnoDB] The error means the system cannot find the path specified.
2024-03-25T21:00:22.457026Z 4 [ERROR] [MY-012216] [InnoDB] Cannot open datafile for read-only: './sys/sys_config.ibd' OS error: 71
2024-03-25T21:00:22.457212Z 4 [Warning] [MY-012049] [InnoDB] Cannot calculate statistics for table `sys`.`sys_config` because the .ibd file is missing. Please refer to http://dev.mysql.com/doc/refman/8.0/en/innodb-troubleshooting.html for how to resolve the issue.
2024-03-25T21:00:22.457400Z 4 [ERROR] [MY-013178] [Server] Execution of server-side SQL statement '-- Copyright (c) 2014, 2023, Oracle and/or its affiliates. -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; version 2 of the License. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -- -- Table: sys_config -- -- Stores configuration options for sys objects -- CREATE TABLE IF NOT EXISTS sys_config ( variable VARCHAR(128) PRIMARY KEY, value VARCHAR(128), set_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, set_by VARCHAR(128) ) ENGINE = InnoDB; ' failed with error code = 1812, error message = 'Tablespace is missing for table `sys`.`sys_config`.'.
2024-03-25T21:00:22.464704Z 0 [ERROR] [MY-013380] [Server] Failed to upgrade server.
2024-03-25T21:00:22.464764Z 0 [ERROR] [MY-010119] [Server] Aborting
2024-03-25T21:00:25.344026Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.36) MySQL Community Server - GPL.
my.cnf
[mysqld]
# GENERAL #
user = mysql
port = 3306
pid-file = /run/mysqld/mysqld.pid
socket = /run/mysqld/mysqld.sock
# SAFETY #
max_allowed_packet = 16M
skip_name_resolve
sql_mode = STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
# DATA STORAGE #
datadir = /mnt/HC_Volume_9595394/mysql/
# BINARY LOGGING #
#skip_log_bin
server_id = 1
log_bin = /mnt/HC_Volume_9595394/mysql/mysql-bin
binlog_expire_logs_seconds = 86400
sync_binlog = 0
# CACHES AND LIMITS #
tmp_table_size = 64M
max_heap_table_size = 64M
max_connections = 500
thread_cache_size = 50
table_definition_cache = 4096
table_open_cache = 4096
# INNODB #
innodb_redo_log_capacity = 512M
innodb_log_buffer_size = 64M
innodb_file_per_table = 1
innodb_buffer_pool_size = 1G
innodb_flush_log_at_trx_commit = 0
innodb_buffer_pool_instances = 1
innodb_read_io_threads = 12
innodb_write_io_threads = 12
innodb_stats_on_metadata = 0
# LOGGING #
log_error = /mnt/HC_Volume_9595394/mysql/mysql-error.log
log_queries_not_using_indexes
slow_query_log
slow_query_log_file = /mnt/HC_Volume_9595394/mysql/mysql-slow.log
long_query_time = 1
performance-schema = 0
local-infile = 0
mysqlx = 0
connect_timeout = 5
interactive_timeout = 30
read_buffer_size = 256K
join_buffer_size = 512K
sort_buffer_size = 512K
read_rnd_buffer_size = 512K
apt update && apt upgrade
andDebian Bookworm