PDA

View Full Version : restoring mysql db


Jayphen
7-31-04, 10:17 AM
I have recently joined powweb, and am in the process of moving my sql database over to the new server. I used phpmyadmin to create a zipped sql file. this file was approx 15mb. I split it into four seperate files, three of which I managed to keep under 2mb, but one (the one with the table that contains every post from the forum) is 10mb.. when I try to restore this one, it times out. the first one worked fine though.

my question is, how do I split this table (it is just one table in the 10mb sql file) into multiple tables, or somehow span it across multiple .sql files, so that I can upload them one at a time, without phpmyadmin timing out?

gillcouto
7-31-04, 11:58 AM
If you need to split sql files, you can put as many INSERT statements into as many files as needed. In your case, you can use 5 or 6 files under 2MB each. Make sure the CREATE TABLE block is entirely at top of the first file, then the long series of INSERT statements can be split at lines near the 2MB filesize.

Jayphen
7-31-04, 01:01 PM
I ended up just using HalfaBee's script to restore the full 15mb sql file, and it worked like a charm :)

thanks for your help anyway dude!