WordPress.org

Support

Support » Localhost Installs » [Resolved] Error establishing a database connection

[Resolved] Error establishing a database connection

  • i have configured everything as followed video of lnda.com.
    now when i m trying to start the localhost its showing “error in establishing database connection” while running “http://localhost/wp-admin/install.php”.
    Can anybody tell me what to do with it to get the problem fixed.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Christine Rondeau

    @crondeau

    Volunteer Forum Moderator

    This usually means that the info you’ve entered in the wp-config.php isn’t right. You need to check your database, name, username and password.

    i think there is problm with database name thats localhost…how to figure it out if its correct or not..?

    Is your database server running?

    I dont know…how to check that..?

    What are you using to install wordpress wamp,xampp or Mamp

    check your database is active or not.

    there may be many reasons like:–

    ->your database server is down.
    ->you have entered wrong information in wp-config.php

    Also let me know which AMPP package you are using ?
    XAMPP ,WAMPP or MAMP ?

    provide more details.

    I m using wamp 2.2

    When you run install program you can use root as database name and no password.

    We’ve had this in the past several times, and it’s generally been related to server/hosting problems rather than something on our WordPress instance.

    @govpatel ya i m using root as database name and password ” ” (nothing but a space) still when i put my localhost on it gives that message.

    @adambanaster than how to fix it let me know pls..:(

    @govpatel ya i m using root as database name and password ” ” (nothing but a space) still when i put my localhost on it gives that message.

    Do you mean you have double quotes in as password inside single quotes this is something you should have in wp-config.php unless you setup a password for the database and you should have password .

    define('DB_NAME', 'DB_name');
    
    /** MySQL database username */
    define('DB_USER', 'root');
    
    /** MySQL database password */
    define('DB_PASSWORD', '');
    
    /** MySQL hostname */
    define('DB_HOST', 'localhost');

    `

    @govpatel Thanxx a lot the problem was due to the space i gave between inverdted commaos….but again caught up somewhere.
    When wprdpress started i gave a username n didn’t entered any password and a random password generalised and now when m trying to login i am unable to as i thought i can change anything anytime…what to do now..?

    i sorted out everything..its working…thanxx every1..:)

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘[Resolved] Error establishing a database connection’ is closed to new replies.
Skip to toolbar