Title: SQL import problems
Last modified: August 18, 2016

---

# SQL import problems

 *  [degavf](https://wordpress.org/support/users/degavf/)
 * (@degavf)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/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)

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/sql-import-problems/#post-339104)
 * 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](https://wordpress.org/support/users/degavf/)
 * (@degavf)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/sql-import-problems/#post-339137)
 * 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.
 *  [davus](https://wordpress.org/support/users/davus/)
 * (@davus)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/sql-import-problems/#post-339148)
 * 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](https://wordpress.org/support/users/degavf/)
 * (@degavf)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/sql-import-problems/#post-339203)
 * 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](https://wordpress.org/support/users/degavf/)
 * (@degavf)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/sql-import-problems/#post-339465)
 * Bump.
    I’m still having the same problem… anyone else have any ideas–specifically
   regarding reducing the size of wp_postmeta?
 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/sql-import-problems/#post-339466)
 * 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 ?
 *  [vkaryl](https://wordpress.org/support/users/vkaryl/)
 * (@vkaryl)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/sql-import-problems/#post-339467)
 * Also there’s BigDump from [http://www.ozerov.de/bigdump](http://www.ozerov.de/bigdump)–
   I’ve had good luck with that.
 *  [Kassad](https://wordpress.org/support/users/kassad/)
 * (@kassad)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/sql-import-problems/#post-339468)
 * 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](https://wordpress.org/support/users/degavf/)
 * (@degavf)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/sql-import-problems/#post-339469)
 * 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.
 *  [vkaryl](https://wordpress.org/support/users/vkaryl/)
 * (@vkaryl)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/sql-import-problems/#post-339470)
 * Please post back to let us know what if anything worked for you, okay?
 *  Thread Starter [degavf](https://wordpress.org/support/users/degavf/)
 * (@degavf)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/sql-import-problems/#post-339498)
 * 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.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 11 replies
 * 6 participants
 * Last reply from: [degavf](https://wordpress.org/support/users/degavf/)
 * Last activity: [20 years, 2 months ago](https://wordpress.org/support/topic/sql-import-problems/#post-339498)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
