WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Error establishing a database connection (14 posts)

  1. vishu.crazy1
    Member
    Posted 1 year ago #

    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.

  2. 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.

  3. vishu.crazy1
    Member
    Posted 1 year ago #

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

  4. fonglh
    Member
    Posted 1 year ago #

    Is your database server running?

  5. vishu.crazy1
    Member
    Posted 1 year ago #

    I dont know...how to check that..?

  6. govpatel
    Member
    Posted 1 year ago #

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

  7. Gyan
    Member
    Posted 1 year ago #

    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.

  8. vishu.crazy1
    Member
    Posted 1 year ago #

    I m using wamp 2.2

  9. govpatel
    Member
    Posted 1 year ago #

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

  10. adambanaster
    Member
    Posted 1 year ago #

    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.

  11. vishu.crazy1
    Member
    Posted 1 year ago #

    @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..:(

  12. govpatel
    Member
    Posted 1 year ago #

    @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');

    `

  13. vishu.crazy1
    Member
    Posted 1 year ago #

    @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..?

  14. vishu.crazy1
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.