maria-discuss team mailing list archive
Mailing list archive
Re: Failure upon startup due to changes in/var/lib/mysql/databasename/
Wed, 7 Jun 2017 11:07:20 +0000
en-GB, de-CH, en-US
[Maria-discuss] Failure upon startup due to changes in/var/lib/mysql/databasename/
Transportable tablespaces is a possible, if fiddly, option...
I think I've only ever done this between MariaDB instances but it should work with a source MySQL servers. Here's an example I did a while back...
From: Maria-discuss [mailto:maria-discuss-bounces+rhys.campbell=swisscom.com@xxxxxxxxxxxxxxxxxxx] On Behalf Of Reinis Rozitis
Sent: 07 June 2017 12:58
Subject: Re: [Maria-discuss] Failure upon startup due to changes in/var/lib/mysql/databasename/
> When I broke MariaDB, it was no longer feasible to start it, (to the
> degree that it could have taken days of tinkering), With MariaDB
> verified to be not running, I tarred the directory
> /var/lib/mysql/mywiki/ into a file mywiki_with_new_data.tar.
> I reinstalled MariaDB thoroughly to force the creation of a new
> /var/lib/mysql/ and /etc/mysql/ .
As Reindl Harald pointed out you can't do this with InnoDB since it has the 'ibdata' table namespace file.
Afaik the only engine you can move/recreate table this way (binary) is MyISAM (and if I'm not wrong also Aria) all other engines more or less have some sort of namespace implementation and it's not possibly to move a single database/table to a different server just by copying the table files.
p.s. I share similar opinions about the "innodb_file_per_table" not being enough and especially that in some cases the namespace file tends to grow beyond reason and there is no way to shrink/compact it other than a full data dump / deleting it and reimporting in a clean instance.
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~maria-discuss
More help : https://help.launchpad.net/ListHelp