Support » Fixing WordPress » problem moving to new hosting plan <–and new DB name

  • I am trying to move my various WP sites from one hosting plan to another. My main reason for doing this is that my current hosting company has a limited amount of MySQL databases I can have (max of 10) and I can’t give the database a descriptive name (the database name is automatically assigned) which makes management a real pain as I have to keep a little table telling me which site is on what database (they name the databases like [domain name]-1, [domain name]-2, etc)

    So I have found a new hosting service that has unlimited MySQL databases (that I can assign actual names –and even assign usernames myself). The problem I run into is when I attempt to import the old database to the new one using phpmyadmin. I get an error:

    #1044 – Access denied for user ‘[new username]’@’localhost’ to database ‘[old database name]’

    I’m guessing the problem is that the username I now have on the newly created database on the new hosting service doesn’t match the old one (not that I want them to). Also, the database name is different too. Now I can easily see I need to change the wp-config.php file to the new database name and username but how can I successfully import the old database if the username and dbname is different?

    Thanks in advance guys!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Working with a live site and my local site, I usually dump the raw sql from php my admin ( using the export function ) and then edit the sql syntax for the new db. This helps as I have to rename guid’s for localhost as well. This of course requires you to be a little familiar with SQL.

    Anyway, if your database is working, all you really need to do is export and import the data, usernames and passwords and db access should not get in the way.

    What do you mean by “edit the sql syntax”? I can open the .sql file in notepad and see the original database name in plain text but is it just that simple?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘problem moving to new hosting plan <–and new DB name’ is closed to new replies.