Jump to content

Save/Copy database tables to other site.


Leverkusen
Go to solution Solved by QuickOldCar,

Recommended Posts

Is it possible to save history of all my tables from my other site and copy all those history into my new one?

I have milions of posts at my site, but since im moving to other one which is a free host, i want to have all those history.

I can easily copy main structure but i have like millions of posts and i want to keep them all. :)

Link to comment
Share on other sites

  • Solution

If is really large can copy the mysql data files themselves and overwrite in new site.

 

In linux or debian based such as ubuntu is located in /var/lib/mysql/

Each database will have it's own folder, it's table will have multiple files.

 

Windows based is usually C:\Program Files\MySQL\MySQL Server 5.7 or simply C:\mysql, depends where mysql was installed.

 

If a table is corrupt use the repair function

http://dev.mysql.com/doc/refman/5.7/en/repair-table.html

REPAIR TABLE table_name QUICK;

If this for some reason it fails try use_frm to repair the myi file

REPAIR TABLE table_name USE_FRM;

I've done huge databases this way and works much better and faster than exporting and importing large sql files.

 

Edit:

I noticed you said free host which limits the folders can access, may need to export and import each table with a sql file.

Database management programs such as phpmyadmin can do this.

Edited by QuickOldCar
  • Like 1
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.