3

Does anyone have a fix to the problem mentioned in the subject. I recently switched from MySQL to MariaDB and all was fine till suddenly I could no longer connect to the database. There was absolutely no changes made in any settings but MariaDB just stopped working and here is what I could gather from the log

Aug 25 11:26:50 gpsdata-01 mysqld_safe: Starting mysqld daemon with databases from /var/lib/mysql
Aug 25 11:26:50 gpsdata-01 mysqld: 2016-08-25 11:26:50 140205837375424 [Note] /usr/sbin/mysqld (mysqld 10.1.13-MariaDB-1~trusty) starting as process 3816 ...
Aug 25 11:26:50 gpsdata-01 mysqld: 2016-08-25 11:26:50 140205837375424 [Note] InnoDB: Using mutexes to ref count buffer pool pages
Aug 25 11:26:50 gpsdata-01 mysqld: 2016-08-25 11:26:50 140205837375424 [Note] InnoDB: The InnoDB memory heap is disabled
Aug 25 11:26:50 gpsdata-01 mysqld: 2016-08-25 11:26:50 140205837375424 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
Aug 25 11:26:50 gpsdata-01 mysqld: 2016-08-25 11:26:50 140205837375424 [Note] InnoDB: Memory barrier is not used
Aug 25 11:26:50 gpsdata-01 mysqld: 2016-08-25 11:26:50 140205837375424 [Note] InnoDB: Compressed tables use zlib 1.2.8
Aug 25 11:26:50 gpsdata-01 mysqld: 2016-08-25 11:26:50 140205837375424 [Note] InnoDB: Using Linux native AIO
Aug 25 11:26:50 gpsdata-01 mysqld: 2016-08-25 11:26:50 140205837375424 [Note] InnoDB: Using SSE crc32 instructions
Aug 25 11:26:50 gpsdata-01 mysqld: 2016-08-25 11:26:50 140205837375424 [Note] InnoDB: Initializing buffer pool, size = 256.0M
Aug 25 11:26:50 gpsdata-01 mysqld: 2016-08-25 11:26:50 140205837375424 [Note] InnoDB: Completed initialization of buffer pool
Aug 25 11:26:50 gpsdata-01 mysqld: 2016-08-25 11:26:50 140205837375424 [Note] InnoDB: Highest supported file format is Barracuda.
Aug 25 11:26:50 gpsdata-01 mysqld: InnoDB: Transaction 3748540 was in the XA prepared state.
Aug 25 11:26:50 gpsdata-01 mysqld: 2016-08-25 11:26:50 140205837375424 [ERROR] InnoDB: Failed to find tablespace for table '"gps"."events"' in the cache. Attempting to load the tablespace with space id 72.
Aug 25 11:26:50 gpsdata-01 mysqld: 2016-08-25 11:26:50 140205837375424 [ERROR] InnoDB: Failed to find tablespace for table '"gps"."positions"' in the cache. Attempting to load the tablespace with space id 56.
Aug 25 11:26:50 gpsdata-01 mysqld: 2016-08-25 11:26:50 140205837375424 [ERROR] InnoDB: Failed to find tablespace for table '"gps"."user_device"' in the cache. Attempting to load the tablespace with space id 54.
Aug 25 11:26:50 gpsdata-01 mysqld: 2016-08-25 11:26:50 140205837375424 [ERROR] InnoDB: Failed to find tablespace for table '"gps"."device_geofence"' in the cache. Attempting to load the tablespace with space id 83.
Aug 25 11:26:50 gpsdata-01 mysqld: InnoDB: 1 transaction(s) which must be rolled back or cleaned up

I have never previously seen any error such as this when using MySQL. I am a little puzzled because it's just a development database with not that many read/writes - how could it go corrupt? Any pointers on how to fix this?

R.W
  • 530
  • 1
  • 12
  • 34
  • https://twindb.com/recover-corrupt-mysql-database/ – Hackerman Aug 25 '16 at 21:09
  • Was the server rudely stopped (eg, power failure)? Did InnoDB recover successfully? Is Galera enabled? Where is the XA coming from? – Rick James Aug 26 '16 at 02:51
  • No, the Server was never abruptly powered off. It's a Linux VM on Linode - so I cannot pull the power chord. I guess it didn't recover that's why it cannot start anymore. Galera isn't enabled because I am pretty new to MariaDB and thought that I could get one instance working fine, and then move on to setting up Galera. I guess I should have done it earlier. As for the XA, the application that access the Db is sitting on the same server. And there was no high write operations at that time too. – R.W Aug 26 '16 at 03:05
  • 2
    Had the problem today. It was unrecoverable and I had to wipe all database files. I see, there is still no solution to this question. – Leif Aug 16 '18 at 11:39

0 Answers0