Skip to main content

MySQL / MariaDB error with InnoDB on startup

Comments

5 comments

  • GoWilkes
    Also, just discovered that if I remove innodb_force_recovery then MySQL won't restart: Job for mariadb.service failed because a fatal signal was delivered to the control process. See "systemctl status mariadb.service" and "journalctl -xe" for details.
    0
  • cPRex Jurassic Moderator
    Hey hey! There's really not much we can do either through the forums here or through our support team for these issues. We have a great guide on this work here:
    0
  • GoWilkes
    Thanks for the link, @cPRex! I read through it, and I've narrowed the problem down to this: B/1.2 InnoDB Time-Traveling & Log Sequence Number Errors The take away from it: [quote]Somewhere down the line, whether it was an unexpected restart, memory issues, file system corruption, replication issues, manual changes to the InnoDB files, or otherwise, these LSNs became out of "sync". Whether its crashing your server or not, this should be treated as legitimate corruption, and is generally something you'll want to address
    That's all good, but what it doesn't say is how to narrow down which table(s) are causing the problem, and/or how to permanently fix them? The log file hasn't had any updates since 4:30am (no clue why, I went to bed at 4), but that last series of errors points to the "sys" and "mysql" databases: # These first lines were at 3:55am 2021-05-21 3:55:26 0 [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`servers` in the cache. Attempting to load the tablespace with space id 31 2021-05-21 3:55:26 0 [Note] Server socket created on IP: '::'. 2021-05-21 3:55:26 0 [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`time_zone_leap_second` in the cache. Attempting to load the tablespace with space id 12 2021-05-21 3:55:26 0 [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`time_zone_name` in the cache. Attempting to load the tablespace with space id 8 2021-05-21 3:55:26 0 [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`time_zone` in the cache. Attempting to load the tablespace with space id 9 2021-05-21 3:55:26 0 [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`time_zone_transition_type` in the cache. Attempting to load the tablespace with space id 11 2021-05-21 3:55:26 0 [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`time_zone_transition` in the cache. Attempting to load the tablespace with space id 10 2021-05-21 3:55:26 0 [Note] InnoDB: Buffer pool(s) load completed at 210521 3:55:26 2021-05-21 3:55:26 2 [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`gtid_slave_pos` in the cache. Attempting to load the tablespace with space id 27 2021-05-21 3:55:26 0 [Note] Reading of all Master_info entries succeeded 2021-05-21 3:55:26 0 [Note] Added new Master_info '' to hash table 2021-05-21 3:55:26 0 [Note] /usr/sbin/mysqld: ready for connections. Version: '10.3.29-MariaDB-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 MariaDB Server # this error was by itself at 4:14 2021-05-21 4:14:31 5996 [ERROR] InnoDB: Failed to find tablespace for table `sys`.`sys_config` in the cache. Attempting to load the tablespace with space id 21 # then these errors were at 4:30 2021-05-21 4:30:08 9215 [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`server_cost` in the cache. Attempting to load the tablespace with space id 19 2021-05-21 4:30:08 9215 [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`innodb_table_stats` in the cache. Attempting to load the tablespace with space id 30 2021-05-21 4:30:08 9215 [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`transaction_registry` in the cache. Attempting to load the tablespace with space id 32 2021-05-21 4:30:08 9215 [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`slave_master_info` in the cache. Attempting to load the tablespace with space id 16 2021-05-21 4:30:08 9215 [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`innodb_index_stats` in the cache. Attempting to load the tablespace with space id 29 2021-05-21 4:30:08 9215 [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`help_keyword` in the cache. Attempting to load the tablespace with space id 7 2021-05-21 4:30:08 9215 [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`slave_relay_log_info` in the cache. Attempting to load the tablespace with space id 15 2021-05-21 4:30:08 9215 [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`gtid_executed` in the cache. Attempting to load the tablespace with space id 18 2021-05-21 4:30:08 9215 [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`help_relation` in the cache. Attempting to load the tablespace with space id 6 2021-05-21 4:30:08 9215 [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`help_topic` in the cache. Attempting to load the tablespace with space id 4 2021-05-21 4:30:08 9215 [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`slave_worker_info` in the cache. Attempting to load the tablespace with space id 17 2021-05-21 4:30:08 9215 [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`engine_cost` in the cache. Attempting to load the tablespace with space id 20 2021-05-21 4:30:08 9215 [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`help_category` in the cache. Attempting to load the tablespace with space id 5
    Based on that, I'm guessing that the corruption is in the main MySQL tables instead of account databases? How do I restore (reinstall?) these? I was finally able to get a hosting client's account fixed last night by exporting the database to .SQL, editing the file to replace ENGINE=InnoDB to Engine=MyISAM, creating a new database in the account using cPanel and assigning the same user to it, importing the backed up .SQL to it, deleting the old one manually via FTP (I got an error when trying to drop it via cPanel or PMA), and then modifying Wordpress (/wp/wp-config.php) to point to the new database. I couldn't just rename it to the old database name, because MySQL kept recognizing the tables as InnoDB (presumably from cache). That's obviously not an option with system files. I can back it up and import it to a new database, but that doesn't do me a whole lot of good :confused: [quote] it's usually best to get outside help from a database specialist to ensure you avoid data loss.
    Great in theory, but I've seen a YoY drop in ad revenue for the last 4 years, and then it dropped to virtually nil during COVID. So unless you know some kind hearted specialists that can do it pro bono, I'm kinda stuck figuring it out for myself :cool:
    0
  • cPRex Jurassic Moderator
    I don't have much else to provide on my end. We're strictly hands-off when it comes to InnoDB issues. Another user may chime in with their experience.
    0
  • GoWilkes
    I don't blame you, I wouldn't touch it with a 10-foot pole, either, if I had a choice! LOL I had originally changed several of my tables with high-inserts low-reads (more or less logs) to InnoDB because it was supposed to be preferable, but I never noticed any performance issues with it. And more recently, I've learned that the type of problem I'm having is VERY common:
    0

Please sign in to leave a comment.