4 ms·
> I switch between multiple versions of MySQL and MariaDB all day long. Mike, maybe I misundertood this, but I think they meant actually moving /var/lib/mysql
by ergo14 9y ago
> I switch between multiple versions of MySQL and MariaDB all day long.
Mike, maybe I misundertood this, but I think they meant actually moving /var/lib/mysql between maria/mysql.
- zzzeek 9y agoOh you might be right about that. I'd be pretty nervous going in either direction on top of constant datafiles. Just mysqldump and be done with it.
- VintageCool 9y agoMy understanding is that MariaDB is using an updated replication format which is not readable by Oracle MySQL or the Percona fork of MySQL. So you could not maintain a MySQL slave of a MariaDB instance, and would have to take downtime to switch from MariaDB to MySQL. (This is only be true if you're using GTIDs in MariaDB, the old file:position format is still compatible. MariaDB does understand MySQL GTIDs, so replication from MySQL to MariaDB does work when using GTIDs in MySQL.)
- jack9 9y agoI stopped moving live files around in MySQL as a migration strategy decades ago. Why would you want to deal with anything but data?
- zzzeek 9y agoThere is definitely a difficulty in using dumpfiles if your database is 50G in size.
- beiller 9y agoActually, from experience, you are wrong. If your database if 50G, chances are most of that is index space. So no, mysqldump has absolutely no problem dealing with database that size.
- petre 9y agoUse mydumper/myloader. I've had issues using mysqldump over 50g databases with three or four figure tables and has to write a script that dumps every table. To get a consistent snapshot you have to close all the client connections.
- ergo14 9y agoI think --single-transaction flag solves this.
- VintageCool 9y agoI pipe dumpfiles into pbzip2, which shrinks 1TB+ dumpfiles down to a very manageable 30-40GB. scp to the new host, import, start replication, and it's good.
- ergo14 9y agoThe problem with this approach is often that the dump restore takes a week to complete.
- ergo14 9y agoWe have 500GB to 900GB, redumping that is fun :-)