Support » Installing WordPress » Error establishing a database connection

  • Dear…

    Well I was very enthusiastic about wordpress and bought the required services I need for wordpress, after transferring all the files to my FTP I get the classic error: Error establishing a database connection. I read the forums and I am 100% I used the right username, password, database name and hostname…

    Please help me, really getting insane at the moment why it doesn’t work… (btw checked my mySQL services etc everything is up and running I really don’t get it)…

Viewing 15 replies - 16 through 30 (of 36 total)
  • Stupid me …I had the same problem. I went back to check everything and found that I had forgotten to save the Username/Password settings. Once I “saved” it everything was fine! Duh!!!

    Anybody got any idea what wp() in wordpress/wp-blog-header.php should be

    Errr… what? Don’t edit the wp-blog-header.php file. It’s correct as it is.

    If its correct why do I get the following:

    Fatal error: Call to undefined function: wp() in /home/domains/acidreflux-and-gerd.com/web/wordpress/wp-blog-header.php on line 18

    Hey dbenson9876 I have the same type of account with godaddy. Where exactly did you change that “localhost” entry? Some how over the course of the day the error message has changed. Here’s what I’m getting now.

    ————————–

    Internal Server Error

    “The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator, support@supportwebsite.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    Apache/1.3.33 Server at martyblogs.com Port 80″

    ————————–

    Anybody know how to fix this?

    jtilton what username and password settings are you referring to and where did you correct it?

    Thanks…..Martin

    Hi Newbie here so always believe I got it wrong (99% right)
    error message is useer name password ok but not able to select database.
    This is what I have in my config

    // ** MySQL settings ** //
    define(‘DB_NAME’, ‘mydomainname.com’); //www.mydomainname.com’define(‘DB_USER’, ‘username’); //account.webhost.com-username
    define(‘DB_PASSWORD’, ‘password’); //www.mydomainname.com-username-password
    define(‘DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value
    define(‘DB_CHARSET’, ‘utf8’);
    define(‘DB_COLLATE’, ”);

    Have tried many many variations – where am I going wrong? Please

    Moderator kmessinger

    (@kmessinger)

    <?php
    // ** MySQL settings ** //
    define(‘DB_NAME’, ‘mydatabasename’); // The name of the database
    define(‘DB_USER’, ‘username’); // Your MySQL username
    define(‘DB_PASSWORD’, ‘password’); // …and password
    define(‘DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value

    See above. 1.) Your db name is not your domain name. It is the name of your database which is usually like wp-1 or mydb or mydogsname-1 – whatever you named the db. You should be able to go to your website admin and find the db to check the name.
    2.)your user name is just that – just the name you sign in with when you go to your website admin
    3.)your password should be just the password you sign in with when you go to your site admin
    4. leave this alone for now
    define(‘DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value
    Delete this
    define(‘DB_CHARSET’, ‘utf8’);
    define(‘DB_COLLATE’, ”);

    I also have a problem .I have been used domaincheck.net windows server .

    <?php
    // ** MySQL settings ** //
    define(DB_HOST’,’h50mysql.secureserver.net’);
    define(‘DB_NAME’, ‘username’); // The name of the database
    define(‘DB_USER’, ‘username’); // Your MySQL username
    define(‘DB_PASSWORD’, ‘password’); // …and password

    // You can have multiple installations in one database if you give each a unique prefix
    $table_prefix = ‘wp_’; // Only numbers, letters, and underscores please!

    // Change this to localize WordPress. A corresponding MO file for the
    // chosen language must be installed to wp-content/languages.
    // For example, install de.mo to wp-content/languages and set WPLANG to ‘de’
    // to enable German language support.
    define (‘WPLANG’, ”);

    /* That’s all, stop editing! Happy blogging. */

    define(‘ABSPATH’, dirname(__FILE__).’/’);
    require_once(ABSPATH.’wp-settings.php’);
    ?>

    Anyone can help me??

    My ISP advises that I have completed wp_config.psp correctly.

    Where do I go from here???

    Thank you for your help.
    Gave me the right questions to ask host.
    Contacted my provider who has an auto setup for wordpress and you guys already.
    So cleared my files and used there loader – took 5 minutes.
    So everyone having trouble ask your provider/host for help. (of course some have already done that – sorry).
    Look forward to Bloging with you at http://www.hwhsolutions.com/blog

    rcaffrey I left a message on your new blog which is waiting for moderation. Do I get a prize for making the first comment.

    my question was which provider are you using?

    Kelvyn

    Success at last. Thank you

    Kelvyn

    Kelvyn,
    Is it now fixed? I noticed that the file output you posted about did in fact have an input error despite your 14 checks 😉

    ?

    php // **MySQL settings ** // defie(‘DB_NAME’, ‘acidreflux’); // The name of the database define(‘DB_USER’, acidreflux); // Your MySQL username define(‘DB_PASSWORD’, ‘REMOVED’); // …and password define(‘DB_HOST’, ‘209.126.254.221 // 99% chance you won’t need to change this value define(‘DB_CHARSET’, ‘utf8’);

    (‘DB_USER’, acidreflux); is wrong. should have been (‘DB_USER’, ‘acidreflux’);

    so, I appear to be having a similar issue. what makes mine a little different is that mine was working perfectly for about a month and then poof. I get the database connection error. I’m certain I have everything entered correctly in my wp-config.php file (as it was working fine). I checked with my host and they confirm that my DB is working properly. Any help/ideas would be appreciated–including which files I should back up if I have to start over. I don’t want to lose what I’ve already posted.

    If it was working fine a month ago then either you changed something recently or your host did or you WP install somehow became corrupted. Did you change anything?

Viewing 15 replies - 16 through 30 (of 36 total)
  • The topic ‘Error establishing a database connection’ is closed to new replies.