Support » Installing WordPress » NEWBIE – Error establishing a database connection

  • Hi all I am new to this so please bare with me if I sound confused and have no idea on what I’m doing!

    So I am trying create my own website using wordpress. After chatting to my host they then told me I would have to install wordpress myself and linked me to

    I downloaded latest version of wordpress the other day (3.4.2 im assuming), My platform is OSX 10.5.8 and I have installed MAMP (old version from a while ago version MySQL 5.0.19 and phpMyAdmin 2.7.0-pl2) Its telling me that its all up and running on my computer.

    I am working through dreamweaver CS3.

    So as far as i’m concerned I have been following the installation instructions as my wp-config.php file has all the relevent info from the database and user that I created in phpmyadmin.

    I get to the last hurdle and get this message

    Error establishing a database connection
    This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost. This could mean your host’s database server is down.
    Are you sure you have the correct username and password?
    Are you sure that you have typed the correct hostname?
    Are you sure that the database server is running?
    If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

    I am confused all all the info seems to be right.
    Is there something I need to do in dreamweaver to link mySQL to my host??? there are no instructions to do this in the codex instructions. And I have no idea what I am doing! I am trying to understand all this though 🙂 Any help for me would be greatly appreciated.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Your hosted site and your MAMP install are completely different. What you put on the MAMP install is going to be accessible only from your local area network– aka., stuff in your house :). You need to install WordPress on you host to have it visible on the web. So which are we working on?


    Thanks so much for getting back to me. That would make sense! I get so confused with it all. I have now apparently installed a wordpress app on my host. Do I still need to download the wordpress files or are they there on my wordpress site somewhere? I can’t find them, I am going to try and follow this tutorial on creating a wordpress site from html one i’m done with all this setting up. should I go to step 3 in the codex istallation guide and set up wp-config.php or is this already done for me now?

    apparently it’s all installed. so then how to access all these files that have been installed (the ones that i would have downloaded from and installed manually, that include wp-config.php)

    What is your domain name? I really can’t answer most of your questions without it.

    I would strongly recommend developing your site on the MAMP server and then uploading to your host. That way, you always have a backup of the source code and, well, you will break stuff as you work. You may as well break things privately.

    This is my domain
    I managed to figure it out and get it going through my host. I’m basically trying to transfer my old site of to wordpress so most of the code is already there. Just need to add php to it. (which I have no idea about, what you see at the moment is where i just followed the tutorial I linked previously). I am working in a subdirectory for the time being until Im ready to switch over fully.

    this is probably a silly question but If I work through MAMP will I still be able to work through the wordpress interface like I have been doing remotely?
    And would I have to delete the template I have created so far before I upload from MAMP?

    Thanks in advance 🙂

    FYI I only managed to create index.php in wordpress so far. links through to other pages are to my old html website (i’m sure you know that anyway 🙂

    this is probably a silly question but If I work through MAMP will I still be able to work through the wordpress interface like I have been doing remotely?

    Yes, but not on the same database. Your MAMP would be a kind of dummy database. You wouldn’t want to bother creating the real content there. Just use it to tweak your theme and such.

    And would I have to delete the template I have created so far before I upload from MAMP?

    You would copy the theme you’ve created so far to MAMP. After that you’d just upload the changes to the theme from MAMP to the hosted server.

    Thanks for your help. Just fund out that wordpress file are not compatable with my version of MAMAP. This version is only compatable with my operating platform. So if i were to upgrade to the latest platform i will have to upgrade my Imac and my CS suite! Looks like i am going to have to start saving! Very frustrating 🙁 I dont suppose there is a old version on wordpress i can use to use with my MAMP?

    There is a release archive but you may find that things work on MAMP and don’t work on your server, or the other way around. It wouldn’t recommend it.

    Yes I understand. Thanks so much for your help. Im in the right direction now anyway.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘NEWBIE – Error establishing a database connection’ is closed to new replies.