Title: Problem importing SQl file to new database
Last modified: August 21, 2016

---

# Problem importing SQl file to new database

 *  [gingersoul](https://wordpress.org/support/users/gingersoul/)
 * (@gingersoul)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/problem-importing-sql-file-to-new-database/)
 * Hi,
    I’ve built a site on a test domain but now want to transfer it to the client’s
   server. I’ve exported the sql file from the test site database testsite_ and 
   created a database newsite_ and user newsiteuser_ (with all privileges) on the
   new server. I’ve copied all the files across via ftp but when I come to import
   the old database I get the following error:
 * #1044 – Access denied for user ‘user’@’localhost’ to database ‘testsite_’
 * Does this mean I’m not importing the file as the right user? I can’t see a way
   to select users in phpMyAdmin.
 * I’m just starting out with wordpress and all this database stuff is completely
   new to me. I’m assuming I’ll have to change all instances of the old domain to
   the new one, but how and at what point do I do this? Any help would be massively
   appreciated.

Viewing 1 replies (of 1 total)

 *  [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * (@vtxyzzy)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/problem-importing-sql-file-to-new-database/#post-4295312)
 * There are URLs and paths stored in the database in ‘serialized’ form where the
   string length is stored along with the string. You must use special tools to 
   search and replace the old values with the new ones.
 * If you replace an old URL with a new one of a different length, it will break
   the serialization, causing many different problems.
 * If the old site is still available, you can use the steps shown in this article
   to copy the site: [http://wordpress.mcdspot.com/2012/08/22/migrating-a-wordpress-site-step-by-step/](http://wordpress.mcdspot.com/2012/08/22/migrating-a-wordpress-site-step-by-step/)
 * If the old site is not available, and you still have a copy of the database from
   that site, you should be able to use this tool to make the changes: [http://interconnectit.com/products/search-and-replace-for-wordpress-databases/](http://interconnectit.com/products/search-and-replace-for-wordpress-databases/)

Viewing 1 replies (of 1 total)

The topic ‘Problem importing SQl file to new database’ is closed to new replies.

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [sql](https://wordpress.org/support/topic-tag/sql/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/problem-importing-sql-file-to-new-database/#post-4295312)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
