You are not logged in.

#1 2019-06-28 13:16:19

broms
Member
From: USA
Registered: 2016-07-07
Posts: 10

[SOLVED] MariaDB 10.4.6-1 Upgrade Datadir not found

I just upgraded to MariaDB 10.4.6-1 and it looks like my datadir was erased. Now I'm getting a bunch of InnoDB errors for missing tablespaces and the service can't start:

 
Jun 28 08:55:58 myServer mysqld[11949]: 2019-06-28  8:55:58 0 [ERROR] InnoDB: Could not find a valid tablespace file for ``vtiger_db`.`vtiger_wsapp_logs_details``. Please refer to https://mariadb.com/kb/en/innodb-data-dictionary-troubleshooting/ for how to resolve the issu>
Jun 28 08:55:58 myServer mysqld[11949]: 2019-06-28  8:55:58 0 [Warning] InnoDB: Ignoring tablespace for `vtiger_db`.`vtiger_wsapp_logs_details` because it could not be opened.
Jun 28 08:55:58 myServer mysqld[11949]: 2019-06-28  8:55:58 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
Jun 28 08:55:58 myServer mysqld[11949]: 2019-06-28  8:55:58 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
Jun 28 08:55:58 myServer mysqld[11949]: 2019-06-28  8:55:58 0 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
Jun 28 08:55:58 myServer mysqld[11949]: 2019-06-28  8:55:58 0 [ERROR] InnoDB: Cannot open datafile for read-only: './vtiger_db/vtiger_wsapp_queuerecords.ibd' OS error: 71
Jun 28 08:55:58 myServer mysqld[11949]: 2019-06-28  8:55:58 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
Jun 28 08:55:58 myServer mysqld[11949]: 2019-06-28  8:55:58 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
Jun 28 08:55:58 myServer mysqld[11949]: 2019-06-28  8:55:58 0 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
...
Jun 28 08:55:58 myServer mysqld[11949]: 2019-06-28  8:55:58 0 [Note] InnoDB: 10.4.6 started; log sequence number 46754325; transaction id 69300
Jun 28 08:55:58 myServer mysqld[11949]: 2019-06-28  8:55:58 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
Jun 28 08:55:58 myServer mysqld[11949]: 2019-06-28  8:55:58 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
Jun 28 08:55:58 myServer mysqld[11949]: 2019-06-28  8:55:58 6 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1017: Can't find file: './mysql/' (errno: 2 "No such file or directory")
Jun 28 08:55:58 myServer mysqld[11949]: 2019-06-28  8:55:58 0 [Note] InnoDB: Buffer pool(s) load completed at 190628  8:55:58
Jun 28 08:55:58 myServer mysqld[11949]: 2019-06-28  8:55:58 0 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
Jun 28 08:55:58 myServer mysqld[11949]: 2019-06-28  8:55:58 0 [Note] Server socket created on IP: '::'.
Jun 28 08:55:58 myServer mysqld[11949]: 2019-06-28  8:55:58 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.db' doesn't exist
Jun 29 08:55:58 myServer mysqld[11949]: 2019-06-28  8:55:58 0 [ERROR] Aborting

I can do

sudo mysqld_safe --datadir=/path/to/mysql

but any time I try to connect I get the error:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (111)

In the error log that command generates, I'm getting the above not found errors for all my tables.

is my db just hosed and I need to start from scratch, or is there a way to recover from this and get my data back?

Last edited by broms (2019-07-07 22:39:15)

Offline

#2 2019-06-28 14:44:22

mcmillan
Member
Registered: 2006-04-06
Posts: 737

Re: [SOLVED] MariaDB 10.4.6-1 Upgrade Datadir not found

Sounds like issues related to the news post https://www.archlinux.org/news/mariadb- … ervention/

Offline

#3 2019-06-28 21:38:09

cmdrsweeper
Member
Registered: 2015-09-05
Posts: 12

Re: [SOLVED] MariaDB 10.4.6-1 Upgrade Datadir not found

Most likely related to a file moving fetish by the MariaDB devs have that were mentioned in the news post.

Offline

#4 2019-07-07 22:38:08

broms
Member
From: USA
Registered: 2016-07-07
Posts: 10

Re: [SOLVED] MariaDB 10.4.6-1 Upgrade Datadir not found

Looks like the upgrade moved my datadir. I ran a find to track it down:

sudo find / -name mysql -type d

Then copied it back to where it belonged (where my my.cnf has it configured to be), and chowned the files to mysql:mysql. After that the service starts correctly. I was able to run mariadb upgrade and complete the update successfully.

Offline

Board footer

Powered by FluxBB