My host now offers a larger space for databases, 1G vs the 100MB.
So I'm now trying to copy the database over from the smaller space.
So far, the only success I'm having is when doing it one table at a time. I also need to first create the table, eg wp_posts, and then import over it. If I don't create it first, an import doesn't work. At this rate a full backup and restore would take a few hours.
Any ideas why this doesn't work by importing the full backup? Maybe it's simply too large?
It depends on your host.
One way to do it is to simply upload the whole thing by ftp.
Create a new directory
ftp the file into it
Email the host support and ask them to import it.
Another way is to ftp but ask the host for shell access to do the import yourself. If you aren't sure about that tell them you aren't - it might help them do it for you.
And yes they can be too large for the importer.
Mark - much thanks. Does it make sense that when I do it a table at a time, it's two steps, create empty table then import? I thought the import created the tables?
2 ways to possibly help reduce db size.
1. Install Akismet and get it check all comments for spam then delete everything it says is spam.
2. Run a plugin which deletes revisions. "Better Delete Revision" from the plugins directory works well.
BUT - you MUST first create a backup of the whole untouched db file. I cannot emphasise this enough. Mistakes happen - you NEED a backup. Seriously you do.
The import should create the table.
I would ftp the file and ask the host as nicely as possible. It's an easy command to run - you just need to tell them where the file is and what it is called.