0

I had to reset my dedicated server, so i backuped the whole /var/lib/mysql directory (stored in OVH Backup Storage).

Today on my clean dedicated, i reinstalled mariadb and so putted the whole /var/lib/mysql directory of the backup into /var/lib/mysql (the new). I just copied the databases directories (i also have other files like ibdata etc.).

But the MariaDB files don't load, so i tried running the following:

mysqlcheck -u root -p --auto-repair --all-databases

And i get tons of Table "..." doesn't exists, while i copied the database directory.

So i gave a run copying the ibdata file, and mariadb wasn't starting anymore.

Do anyone have a solution for copying my MariaDB databases?

I also chowned the directory

EDIT:

I see pretty much everywhere peoples talking about a .ibd file needed, while backuping that file wasn't displayed and not saved. As i said i use MariaDB and i also have an ibdata file.

  • Did you preserve owners and permissions while copying the files? – Tero Kilkanen Mar 19 '17 at 13:58
  • I also did chown -R mysql:mysql /var/lib/mysql –  Mar 19 '17 at 14:03
  • Edited adding more informations –  Mar 19 '17 at 16:49
  • Do you have the same configuration on old and new MySQL installation? – Tero Kilkanen Mar 19 '17 at 18:01
  • Yes, same password, user and etc. –  Mar 19 '17 at 18:14
  • Check your logs. – Michael Hampton Mar 19 '17 at 18:18
  • Well, i can see something like "170319 17:21:59 [ERROR] Cannot find or open table panel/users from the internal data dictionary of InnoDB though the .frm file for the table exists. Maybe you have deleted and recreated InnoDB data files but have forgotten to delete the corresponding .frm files of InnoDB tables, or you have moved .frm files to another database? or, the table contains indexes that this version of the engine doesn't support. See http://dev.mysql.com/doc/refman/5.5/en/innodb-troubleshooting.html how you can resolve the problem." –  Mar 19 '17 at 18:55

0 Answers0