Title: Migrating Database to different server
Last modified: December 29, 2016

---

# Migrating Database to different server

 *  [LochSloidh](https://wordpress.org/support/users/lochsloidh/)
 * (@lochsloidh)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/migrating-database-to-different-server/)
 * I am unable import my WordPress database.
    My old server saved the database file
   as alexande_wp206 My new server has a different primary domain so the database
   automatically comes up as newdomain_wp206
 * The first line in the SQL DB refers to a domain name and directory that is no
   longer a valid domain, I have called it ‘olddomain’
 * This is the error message:
    SQL query:
 * wp.26_54354.2016-12-19_05-07-530000644000115600011720000000315313025665451014567
   0ustar alexandealexande<?php $str = ‘a:28:{s:3:\”sid\”;i:26;s:3:\”ver\”;s:5:\”
   4.3.3\”;s:5:\”itime\”;i:1444834287;s:8:\”softpath\”;s:49:\”/home/alexande/public_html/
   olddomain/wp\”;s:7:\”softurl\”;s:29:\”[http://olddomain/wp](http://olddomain/wp)\”;
   s:8:\”adminurl\”;s:9:\”wp-admin/\”;s:10:\”softdomain\”;s:19:\”olddomain\”;s:6:\”
   softdb\”;s:14:\”alexande_wp206\”;s:10:\”softdbuser\”;s:14:\”alexande_wp206\”;
   s:10:\”softdbhost\”;s:9:\”localhost\”;s:10:\”softdbpass\”;s:10:\”Q8-]194PS2\”;
   s:8:\”dbprefix\”;s:3:\[…]
 * MySQL said: Documentation
    #1064 – You have an error in your SQL syntax; check
   the manual that corresponds to your MariaDB server version for the right syntax
   to use near ‘wp.26_54354.2016-12-19_05-07-53’ at line 1

Viewing 1 replies (of 1 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/migrating-database-to-different-server/#post-8602173)
 * How are you migrating your DB? I’m assuming phpMyAdmin export/import. The format
   of your “query” in the error message looks like a PHP export file. You cannot
   import that format directly into phpMyAdmin.
 * You should use the uncompressed SQL format for export. If the file is too big,
   there’re options to export individual tables. Select the DB you want to export
   before picking the Export tab. The file will then have no database name that’s
   meaningful.
 * When you import the file on the new server, first select your WP DB before picking
   the Import tab. Then the file will be imported into the right DB since the import
   file has no DB name.
 * With uncompressed SQL, you can edit out undesirable portions as long as you maintain
   proper SQL syntax. The file is plain text, use a text editor just like you might
   for code files. Always keep an original copy if you intend to edit the file.

Viewing 1 replies (of 1 total)

The topic ‘Migrating Database to different server’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [9 years, 5 months ago](https://wordpress.org/support/topic/migrating-database-to-different-server/#post-8602173)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
