Support » Fixing WordPress » SQL import problems

  • I’m trying to transfer my wp install from one host to another, and having trouble importing the SQL db. In particular, I get timeout errors when using MyPhpAdmin with table wp_postmeta (this happens even if I import lines individually).

    Any suggestions on what I can do? For example, can I reduce the size of the wp_postmeta table (and if so, how)? It’s currently about 3.1 mb. Or, is there another way to import the SQL db?

    Thanks.

Viewing 11 replies - 1 through 11 (of 11 total)
  • How about opening the .sql file in notepad and just copy a chunk of INSERTs and past them into the SQL tab of the phpmyadmin screen.

    Thread Starter degavf

    (@degavf)

    I tried that, and even copied INSERTs individually… but still got timeout errors. That’s why I’m wondering if/how I can reduce the size of wp_postmeta.

    Okay, upload your database to the host, with an obscure filename. Make a (temporary) file called x.php or something, and make this its contents:

    <?system(“mysql -uUSERNAME -pPASSWORD -hHOST(probably_unneeded) < obscure-databae-name.sql”);?>

    See if that works. Also, if you have shell access (rare), just upload it and run the mysql command.

    Thread Starter degavf

    (@degavf)

    Thanks, Davus. I actually tried that last night… it didn’t work, either. I do have shell access and tried the mysql command directly. I got back an error that [username] couldn’t access [old database].

    Since I’ve been having so much trouble with the import, I thought it would just be easier if I reduce the size of wp_postmeta… then maybe I can do the import through MyPhpAdmin cut and paste.

    Thread Starter degavf

    (@degavf)

    Bump.
    I’m still having the same problem… anyone else have any ideas–specifically regarding reducing the size of wp_postmeta?

    Are you doing a copy/paste with small chunks of the .sql file ? I’ve imported huge files that way without incident – try just a couple of hundred lines at a time ?

    Also there’s BigDump from http://www.ozerov.de/bigdump – I’ve had good luck with that.

    The best way to reduce the size of postmeta if you omit it 🙂

    Well, in phpMyAdmin the import limit is 16Mb.

    If you get timeouts, then there may be conflicts in the dump.

    I would slice it up by tables and import them one by one so you can indentify the possible culprit.

    Thread Starter degavf

    (@degavf)

    podz: I have been doing copy/paste operations of individual lines in my .sql file. The problem is that the individual lines in wp_postmeta are so big that I get timeouts when waiting for the paste to complete. Hence, wondering if I can somehow reduce the size of that table.

    That said, Kassad’s comment got me thinking… what would be the implications of just leaving out wp_postmeta altogether? (I’ll try doing this later today but just curious if anyone knows offhand what will happen)

    I’ll also try BigDump.

    Thanks to all who replied.

    Please post back to let us know what if anything worked for you, okay?

    Thread Starter degavf

    (@degavf)

    After all the trouble, I found a (relatively) easy solution… I took a harsh approach to cleaning my MySQL database (basically I dropped a bunch of tables that I didn’t absolutely need). Then, I was able to successfully export the db from the old host and import it on the new host.

    So, thanks to all who helped.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘SQL import problems’ is closed to new replies.