This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Migrate database after mysql has died
#3
RE: Migrate databases after mysql has died
(05-22-2015, 07:25 PM)apinto Wrote: Please provide more details about your MySQL config.
Usually MySQL does not die, you should have some error that can be fixed.

Keep in mind:
- If the table is using the MyISAM (default) engine you can probably move the files. You can't move the files if it's using InnoDB.
- This is never the better alternative. You should fix the MySQL error first.

This might be usefull: https://www.linode.com/docs/databases/my...-databases

Hope this somehow has helped you Wink

I'm sorry to say that it didn't. My most immediate problem was to migrate the apparently broken database to a new server and get it hooked up to Sentora.

Its true to say I hadn't explained that InnoDB was corrupt and could not be fixed but I feel that topic would be best discussed in a separate thread. This thread is about migrating a database when mysql has died and cannot be revived. Say for example when your site has died and you need to get it back up and running quickly.

Mysql must have used both Innodb and MyiSAM I can only deduce from what you have written. Mysql would start then crash as Innodb had been corrupted. Though the tables existed in file in /var/lib/mysql/<my_database>.

This is how I performed the migration with no mysqldump available on the broken server.
  • Broken server - Navigated to /var/lib/mysql
  • Broken server - Compressed the database folder.
  • Broken server - Moved compressed file to new clean sentora server.
  • New server - Uncompressed the file into the new servers /var/lib/mysql/<my database> folder
  • New server - Used mysqldump to dump <my database> to a my_database.sql file
  • New server - using mysql dropped <my database> that had been manually installed.
  • New server - In sentora panel created a new database.
  • New server - In mysql command line import <my database>  : mysql -u root -p zadmin_<my database> < my_database.sql

This worked for me. I wish I had done this first instead of wasting time trying to restore a completely corrupt InnoDb database.
Reply
Thanks given by: apinto


Messages In This Thread
RE: Migrate databases after mysql has died - by baychae - 05-23-2015, 12:11 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
MySQL Database user prefix MosleyCale 1 5 ,658 10-17-2020, 09:11 PM
Last Post: Ron-e
Senator crash problem with mysql provokas 3 10 ,803 08-20-2020, 04:11 AM
Last Post: Your Creator
Critical Error: [0100] - Unable to connect or authenticate to the Sentora database whatshisface77 1 4 ,449 07-31-2020, 10:58 AM
Last Post: whatshisface77

Forum Jump:


Users browsing this thread: 3 Guest(s)