Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Exporting/Importing to new database without moving files

I've been scratching my head for a while over this, and the other posts don't seem to hold an answer for me...

I'm trying to duplicate the database and use the new database for my site.

I've recently upgraded 1and1 hosting to managed servers, and as part of the upgrade I have to create new databases for each site again. 1and1 take care of the files on the server and so their location never change, it's literally export old database, setup new database and import...right?

Only I export using phpmyadmin default settings (no compression), import using default settings and update the config.php file... BONK.

I've seen people suggest deleting the .ini files in the cache folder, tried that even though they don't seem to contain any database reference. Any suggestions?

Best Answers


  • hgtonighthgtonight ∞ · New Moderator

    Your /conf/config.php file needs to have the database connection information updated. These lines should be filled out with your new information:

    // Database
    $Configuration['Database']['Name'] = 'name';
    $Configuration['Database']['Host'] = 'localhost';
    $Configuration['Database']['User'] = 'root';
    $Configuration['Database']['Password'] = 'password';

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Yup, updated those to the new values, tried several times to make sure there were no typos...

  • @hgtonight said:
    Please report the actual error causing the bonk.

    What version of Vanilla are you running?

    This is the error:
    SQLSTATE[HY000] [2054] Connecting to 3.22, 3.23 & 4.0 servers is not supported

    These are the details:

    Application: Vanilla
    Application Version:
    PHP Version: 5.4.14
    Operating System: Linux
    Server Software: Apache
    User Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31
    Request Uri: /
    Controller: Gdn_Database
    Method: Connection

    Any suggestions?

  • OK after being on the phone to 1and1, I now have a new error:

    SQLSTATE[HY000] [1045] Access denied for user: 'dbo467046125@localhost' (Using password: YES)

    I've triple checked the database name, host, user and password in the config file, and I've reset the password on the database to make sure everything is correct.

    Does anyone have a suggestion? The old database expires in a day or two thanks to the hosting upgrade so if I don't have this fixed by then I'll lose the site!

  • what privalages does the user have, are you sure your host at localhost?

    support at cheap shared host is mostly useless anyway, they are reading from a prepared card.

    grep is your friend.

  • @dalepgrant said:
    SQLSTATE[HY000] [1045] Access denied for user: 'dbo467046125@localhost' (Using password: YES)

    While understanding that you're pressed for time, this is a pure MySQL error. That dbo(number) is the mysql username. Maybe you can change it through cPanel. Make the password really really easy and of course update the conf/config.php Then try again. Now if that works, make the MySQL password a strong password again and see if that works.
    Also check x00's suggestion regarding privileges. I think you can do that through cPanel too.

    There was an error rendering this rich post.

  • hgtonighthgtonight ∞ · New Moderator

    @dalepgrant This is definitely a misconfiguration. 1and1 should be able to tell you, unequivocally, what to put in each of those lines. Ask them for the database name, database host, database user, and database password.

    I used to host a personal site at 1and1; I feel your pain. Be sure to back up regularly and often.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Answer ✓

    @UnderDog & @x00 & @hgtonight thanks for all your help guys, turns out the config file didn't like localhost:/tmp/mysql5.sock, instead I took the server name from inside phpmyadmin and used that.

    Strange as all the other sites I've had to update had no issue with it.

    Thanks again, hope this helps someone else.

  • PDO has own way. You configure the port separately. I believe you have to use the IP not localhost if you want to use a socket.

    grep is your friend.

Sign In or Register to comment.