The MU forums have moved to WordPress.org

Error establishing a database connection (17 posts)

  1. omerosen
    Member
    Posted 14 years ago #

    I tried to install MU in a root directory but I am getting Error establishing a database connection.
    I followed the installation instructions and when I access the index.php at first I was asked "$base is set to BASE when it should be the path like "/" or "/blogs/"", so I changed it to "/".
    Then asked to change the VHOST to yes or no, so I changed it to yes which didn't work and then to no which again didn't work.

    I am struggling for a week with these installations, which is supposed to be automatic and easy id you know your way around Wordpress...

  2. andrea_r
    Moderator
    Posted 14 years ago #

    Don;t edit the config file. It says so right at the top of it.

    Delete .htaccess, drop any tables, delete wp-config.php. Then just visit your site. You'll be prompted on what to do next.

    the reason I say that is I don't think you followed the MU install instruction, as the message you received usually only shows up when you try to install it the same way as single WP. It's slightly different.

  3. omerosen
    Member
    Posted 14 years ago #

    I don't understand the sequence of the instructions.
    Now I upload the files again and I create a new DB to be configured after I finish the upload.
    What should I do after uploading?

  4. andrea_r
    Moderator
    Posted 14 years ago #

    Visit your website. In a browser.

  5. omerosen
    Member
    Posted 14 years ago #

    This is what I get after installing in the root:

    Problem in wp-config.php - $base is set to BASE when it should be the path like "/" or "/blogs/"! Please fix it!

    What should I change it to?
    And then what, the VHOST error message will not appear?

  6. andrea_r
    Moderator
    Posted 14 years ago #

    It's finding another config file from another WordPress install on the server.

    So don't edit any config files. Follow this:
    http://wpmututorials.com/installation2/installing-in-a-subfolder/

    Basically, you make a small hack so it doesn't go looking up a directory, won't find the other config file, then you can continue normally.

  7. omerosen
    Member
    Posted 14 years ago #

    I worked according to the instructions and indeed got to the server details page, but when I submitted the details I got this message:
    Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.
    So I uploaded the config file went back to the installation page and send the information once again, but I got the same message.

  8. omerosen
    Member
    Posted 14 years ago #

    Update:
    I changed the configuration file name by taking off the -sample.
    I uploaded the original configuration file and the httacess and now I am a proud (and tired) owner of WPMU.
    Andrea, million thanks for your help and patience.
    Tack så mycket (thank you very much in Swedish)!

  9. andrea_r
    Moderator
    Posted 14 years ago #

    *whew* at least it works now.

  10. omerosen
    Member
    Posted 14 years ago #

    I was too early to party.
    Although the system was installed successfully, when I published a test post it looked like that: http://pixelme.info/blog/2009/08/17/test-post/
    asking me to put the details again.
    I have no idea what's wrong with that.

  11. andrea_r
    Moderator
    Posted 14 years ago #

    Then something's up and it's not installed right. where are you hosted?

  12. omerosen
    Member
    Posted 14 years ago #

    You mean which hosting company?
    It is servage.net
    According to them there is no problem with them.

  13. michaeljloomis
    Member
    Posted 14 years ago #

    Hey Omer...Did you chmod your root directory and wp-contents directory to 777 before you did the install. I don't remember the directions on the install screen telling you that you need to do that. However the read me file does. But the post install screen does tell you to chmod it back to 755 after the install. Seems like it should be on the install screen as well. Then again wpmu isn't exactly newb friendly.

    Hope this helps.

    Mike

  14. andrea_r
    Moderator
    Posted 14 years ago #

    Yeah, it does tell you that on the install first screen if it can't write the config file.

  15. 5tephe
    Member
    Posted 14 years ago #

    I am having the same (original) error come up, but I have taken the precaution to re-name my config file first, to a nonsense name.

    So I visited the URL, and got the Install screen, and answered the questions as best as I knew how.

    At first, I got a screen telling me that I might not have my Database names right: that I had probably left off the "****_" from "****_WPMU".

    So I said to myself - 'yeah, I wasn't sure about that. I'll go back a page and enter the proper name for it.'

    Which I did.

    Now I get the error
    "Error establishing a database connection"

    The REALLY weird thing is: when I change it back to the name that I had before, and re-submit, I GET THE SAME MESSAGE.

    Thanks folks.

  16. andrea_r
    Moderator
    Posted 14 years ago #

    but I have taken the precaution to re-name my config file first, to a nonsense name.

    Delete it. MU creates the right config file. It is not the same as regular WordPress installation.

    Delete the config file you made. Then go visit your site.

  17. sidwebb
    Member
    Posted 14 years ago #

    I caused the same problem by creating a new blog and mistakenly used the same MySql database. In doing so, I reset the username and password. After discovering the mistake I changed the DB for the new blog and then deleted the config file for the original blog and set it up again. The problem is that the original blog isn't accessing the info in the DB. I know the info is there because I can see it when I open the DB. What do I do to get it to see the info?

About this Topic

  • Started 14 years ago by omerosen
  • Latest reply from sidwebb