Transfering MySQL data from one system to the other
I’ve got all my files from my last MySQL(MariaDB InnoDB) Server and I just noticed I can’t run those files on my new system. I don’t have any .SQL backup of my server and my old system can’t be booted to as far as I know.
I moved from Ubuntu Server 18.04 to CentOS 7 (and a RAID1 configuration), I cloned my original Ubuntu drive to a secondary drive.
Here are the files that I moved from my Ubuntu drive /var/lib/mysql/ Files
[root@localhost ~]# systemctl status mariadb ● mariadb.service - MariaDB 10.2.32 database server Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled) Drop-In: /etc/systemd/system/mariadb.service.d └─migrated-from-my.cnf-settings.conf Active: failed (Result: exit-code) since Thu 2020-07-09 20:20:46 PDT; 26s ago Docs: man:mysqld(8) https://mariadb.com/kb/en/library/systemd/ Process: 3281 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS --basedir=/usr $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE) Process: 3132 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS) Process: 3129 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS) Main PID: 3281 (code=exited, status=1/FAILURE) Status: "MariaDB server is down" Jul 09 20:20:46 localhost.localdomain systemd[1]: Starting MariaDB 10.2.32 database server... Jul 09 20:20:46 localhost.localdomain mysqld[3281]: 2020-07-09 20:20:46 140603055900864 [Note] /usr/sbin/mysqld (mysqld 10.2.32-MariaDB-log) starting as process 3281 ... Jul 09 20:20:46 localhost.localdomain mysqld[3281]: 2020-07-09 20:20:46 140603055900864 [Warning] Can't create test file /media/1TB/var/lib/mysql/localhost.lower-test Jul 09 20:20:46 localhost.localdomain mysqld[3281]: [107B blob data] Jul 09 20:20:46 localhost.localdomain mysqld[3281]: 2020-07-09 20:20:46 140603055900864 [ERROR] Aborting Jul 09 20:20:46 localhost.localdomain systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE Jul 09 20:20:46 localhost.localdomain systemd[1]: Failed to start MariaDB 10.2.32 database server. Jul 09 20:20:46 localhost.localdomain systemd[1]: Unit mariadb.service entered failed state. Jul 09 20:20:46 localhost.localdomain systemd[1]: mariadb.service failed.
I’m not sure what I’m missing and why it won’t start, I wish I would have kept the other system to export a SQL file which would have made my life so much easier.