SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Jan 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Issues moving from 1and1 to Host Gator

    I have signed up with Host Gator and am in the process of moving one of my wordpress sites over from 1and1.

    When I try to import the old database into the newly created database on Host Gator via phpmyadmin import function, I get the following error:

    Code:
    Error
    SQL query:
    -- phpMyAdmin SQL Dump
    -- version 2.6.4-pl3
    -- http://www.phpmyadmin.net
    --*
    -- Host: HOSTNAME
    -- Generation Time: Jan 14, 2012 at 10:03 PM
    -- Server version: 5.0.91
    -- PHP Version: 5.3.3-7+squeeze3
    --*
    -- Database: `DBNAME`
    --*
    CREATE*DATABASE*`DBNAME`*DEFAULT*CHARACTER*SET*latin1*COLLATE*latin1_general_ci;
    
    MySQL said:*
    
    #1044 - Access denied for user 'NEWUSER'@'localhost' to database 'DBNAME'
    I've read that I should just go and add the new user/pass to the old databse before exporting. I would, however 1and1 doesn't allow more than one user/pass. Then I thought I could create a user with the same credentials on the new host - but any new usernames use a different prefix, so that's not possible.

    Is there any way around this?

  2. #2
    SitePoint Wizard silver trophy ldcdc's Avatar
    Join Date
    May 2004
    Location
    Ploiesti
    Posts
    4,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've read that I should just go and add the new user/pass to the old databse before exporting.
    Adding a new user/pass at 1and1 doesn't make sense when you just want to make a backup. What you do need is to have a database created at Hostgator, associate a database username with it and give it all the permissions. This you can and must do via Hostgator's control panel.

    What I believe you're doing wrong is creating the database backup. I think you're going in phpmyadmin, and then go directly to "export", when you need to choose the database you want to work with first. When creating the database backup, you need to follow the instructions at http://faq.1and1.co.uk/web_space__access/mysql/15.html.

    When doing the import via phpmyadmin, you again need to first select/click the database you want to import the data into.

    The database name, database username and password at Hostgator will most likely be different from the ones you had at 1and1 (they have the form yourcpanelaccountusername_databasename). This means you will have to edit your wordpress configuration file with the new credentials.
    HostPeek.com - budget hosts, compared
    CouponsNexus.com - web hosting coupons

    Ultra Cheap Hosts | Web Hosting Reviews Forums

  3. #3
    SitePoint Member
    Join Date
    Jan 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply.

    It seemed odd that one would have to add credentials for this to work but someone online mentioned it somewhere (so it must be true

    I actually had done all you suggested. I had created a database at HG, created a user, gave it full permissions. I went to 1and1, used phpmyadmin to export the database. Only difference is, I think I followed Host Gator's instructions. And, last but not least I had changed the wp config stuff as well.

    In the end, I contacted HG's support and found out the exported database had a few lines that were causing it to try and create a database from scratch. Once those lines were removed, it imported successfully.
    Some things can be so simple...

  4. #4
    SitePoint Member
    Join Date
    Jan 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First your database must be same. like if your database name in your old hosting is abc_wrdp1 then your new host's DB name must be same as abc_wrdp1 after this you are able to upload your database. I have another option just export your database from your old hosting account from the feature export in phpmyadmin. and look for the new database name in your new account and rename the name of that sql file. and upload this will work for you.

  5. #5
    Non-Member
    Join Date
    Apr 2010
    Posts
    298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It seems you are only having one issue with one database. Why not just manually export and import it? It will save you a lot more time instead of trying to get the control panels to do it.

  6. #6
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,265
    Mentioned
    247 Post(s)
    Tagged
    1 Thread(s)
    The problem was solved or at least the opener has not returned. Thread closed.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •