Database error in wordpress

Discussion in 'WordPress' started by Jalpari, Feb 20, 2008.

  1. #1
    Its first time i manually install wordpress.

    steps:
    1- i upload all my files to server
    2- then i create db named wordpress and make some changes (user name, db name, password but i didn't change host name) in wp-config-sample.php and then i save this file as wp-config.php
    3- now i am runnging www.evernewrecipes.com/index.php in my browser but its giving error as:

    Error establishing a database connection! This probably means that the connection information in your wp-config.php file is incorrect. Double check it and try again.

    Are you sure you have the correct user/password?
    Are you sure that you have typed the correct hostname?
    Are you sure that the database server is running?
    WordPress Support Forums


    i am using plesk cp and during installation there was no option for user id , password, and host name the setup was just asking for db name.
    Plz guide me in detail. Reputation will be added. plz don't post any paying offer.:D
     
    Jalpari, Feb 20, 2008 IP
  2. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #2
    You will need to open the file named wp-cofig and add some information to it and then upload it to the sever again.

    In most cases lines 2-3 are all you need to change.

     
    Colbyt, Feb 20, 2008 IP
  3. einsteinsboi

    einsteinsboi Well-Known Member

    Messages:
    1,122
    Likes Received:
    76
    Best Answers:
    0
    Trophy Points:
    140
    #3
    When you open the wp-config.php, does it contain the values that you entered for username, database name, and password? localhost should be okay, you probably don't need to change that, but you do need to enter the name of the database and user you created and the password you assigned that user.

    If your permissions weren't set correctly and you edited the config file online the changes may not have been saved.

     
    einsteinsboi, Feb 20, 2008 IP
  4. Boardwalk

    Boardwalk Well-Known Member

    Messages:
    1,651
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    140
    #4
    Hi there,

    Did you add the user to the database? Make sure you did, and with all permissions. :) ~BW
     
    Boardwalk, Feb 20, 2008 IP
  5. selvam_cbe

    selvam_cbe Peon

    Messages:
    181
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #5
    PLESK 7 will truncating if db password is very lengther.. (Apparently a bug in Plesk) Always keep your DB password between 6-8 characters..It might Work..
     
    selvam_cbe, Feb 20, 2008 IP
  6. Jalpari

    Jalpari Notable Member

    Messages:
    5,640
    Likes Received:
    137
    Best Answers:
    0
    Trophy Points:
    260
    #6
    Hello,
    I make changes in wp-config file only in these lines:

    // ** MySQL settings ** //
    define('DB_NAME', 'db name'); // The name of the database
    define('DB_USER', 'password goes here'); // Your MySQL username
    define('DB_PASSWORD', 'password'); // ...and password
    define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value

    also i remove wp-config sample file from server.
     
    Jalpari, Feb 21, 2008 IP
  7. Jalpari

    Jalpari Notable Member

    Messages:
    5,640
    Likes Received:
    137
    Best Answers:
    0
    Trophy Points:
    260
    #7
    i make changes in wp-config file offline. and i change username, password and db name .

    How to change permission for wp-config file? I have not change permission forany file?

    I have 6 digit password

    Yes i did.
     
    Jalpari, Feb 21, 2008 IP
  8. Emathia

    Emathia Active Member

    Messages:
    917
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    58
    #8
    Make sure you rename the file to wp-config.php, when you first download it's wp-config-sample.php ;)
     
    Emathia, Feb 21, 2008 IP
  9. Jalpari

    Jalpari Notable Member

    Messages:
    5,640
    Likes Received:
    137
    Best Answers:
    0
    Trophy Points:
    260
    #9
    Mates! my issue has been resolved but i am facing template issue.

    thx to all of u
     
    Jalpari, Feb 21, 2008 IP
  10. Boardwalk

    Boardwalk Well-Known Member

    Messages:
    1,651
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    140
    #10
    What's wrong with your template?
     
    Boardwalk, Feb 22, 2008 IP
  11. Jalpari

    Jalpari Notable Member

    Messages:
    5,640
    Likes Received:
    137
    Best Answers:
    0
    Trophy Points:
    260
    #11
    Now nothing wrong i have get my mistake after 2 days of work
     
    Jalpari, Feb 24, 2008 IP