Support » Fixing WordPress » Pointing to another WPMU database

  • I have a website whose directory has been deleted. I reinstalled wordpress with my hosting provider panel which requires the name of a new database so that I cannot put the name of the existing db.

    So it’s only afterwards I changed the name of the database and prefix in wp-config. But I got this message:

    Error establishing a database connection

    I don’t understand why it doesn’t work ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @kipli,

    I’m sorry you’re having issues.

    In order to make sure you’re connecting directly to the old database, you’ll need three major pieces of information, all of which are stored in the wp-config.php file:

    • Database name
    • Database username
    • Database password

    If you’re seeing the Error establishing database connection issue, at least one of the above pieces of information is usually incorrect.

    Do you have this info handy?

    If you don’t, I’d suggest you try:

    1. Look for a backup that contains your old wp-config.php file – if you don’t have one, ask your host if they have a backup you can restore.
    2. Depending on your host, if you can get into phpMyAdmin or the host’s MySQL tools, you should be able to browse to figure out the name of the database and user. Then, make sure to set a new password for that user.
    3. Make sure your wp-config.php file contains the correct Database, Username, and Password.

    Then try to reload your site.

    If that’s all jargon or mumbo-jumbo, you might just start by contacting your host to see if they can either restore the site or help you troubleshoot.

    I hope that helps!

    Hello,

    Thanks for help.

    I’m sure the dbname, username and password are correct because I take them from the hosting panel.

    I had the same pb in the past for other domains, It only works when I copied the same exact wp-config. Unfortunately for this case, I didn’t have a backup of the wp-config yet.

    • This reply was modified 1 year, 6 months ago by  kipli.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Pointing to another WPMU database’ is closed to new replies.