• Resolved loeppkydesigns

    (@loeppkydesigns)


    Hello.
    I am working off a local server and I keep getting the message Error Establishing a Database Connection. I know that my password and user name is correct. I have done this before on a different local server, but this time it is not working for me. Any tips on what I can try? Thank you very much.

Viewing 15 replies - 16 through 30 (of 35 total)
  • Thread Starter loeppkydesigns

    (@loeppkydesigns)

    @snifflevalve
    That is exactly what I have. I set the database name to gardewine so when I do my set up, my database name is gardewine, user = root, password= root, datbasehost =localhost

    Thread Starter loeppkydesigns

    (@loeppkydesigns)

    This is what I have on the wp-config-sample file.

    /** The name of the database for WordPress */
    define(‘DB_NAME’, ‘gardewine’);

    /** MySQL database username */
    define(‘DB_USER’, ‘root’);

    /** MySQL database password */
    define(‘DB_PASSWORD’, ‘root’);

    /** MySQL hostname */
    define(‘DB_HOST’, ‘localhost’);

    /** Database Charset to use in creating database tables. */
    define(‘DB_CHARSET’, ‘utf8’);

    /** The Database Collate type. Don’t change this if in doubt. */
    define(‘DB_COLLATE’, ”);

    This is what I have on the wp-config-sample file.

    But … is this also what you have in the wp-config.php file? This is the one that “counts” ??

    One more try ..

    Open database find the table wp_options and change the “option_value” with your localhost url (Column name)
    for siteurl and home.
    Refer Attached image.Database image

    Thread Starter loeppkydesigns

    (@loeppkydesigns)

    I dont have a wp-config.php file. Just the sample file. Doesnt the wp-config.php get added once you set up wordpress? I could be wrong but I thought that is how i works. It is not letting me set it up.

    I will try that @shaile

    Thread Starter loeppkydesigns

    (@loeppkydesigns)

    @shaile
    It says no tables found in database. The image is not opening for me.

    @loeppkydesigns – you need to rename the wp-config-sample.php file with all your database connection details to wp-config.php. WordPress doesn’t use wp-config-sample.php – that’s just an example of how to create a wp-config.php file. But WordPress absolutely has to have a wp-config.php file with the database connection details to be able to work.

    @loeppkydesigns Still facing issue ?

    Thread Starter loeppkydesigns

    (@loeppkydesigns)

    Okay so I renamed my wp-config-sample.php file to wp-config.php.
    Now when I go to my localhost:8888/gardewine it shows the words Error establishing a database connection but this time with nothing else. Just those words and not the screen I was seeing before.

    Hi,

    Did you create a database in mamp server ??
    >> WordPress needs a database for the installation process

    In localhost some values are fixed by default, Like-
    User: root
    Password: root
    DB host: localhost

    Try this one, hope it will work ??

    As you stated, your database is empty. I think you are missing the installation.
    – delete your wp-config.php and wp-config-sample.php.
    or rename wp-config-bck.php
    – go back to localhost:8888/gardewine
    – it should ask you to start installation
    – when asked enter your database information.

    Thanks,
    Ghani

    Thread Starter loeppkydesigns

    (@loeppkydesigns)

    I have done the installation over and over. Probably like 20 times. I have followed the steps that @shawaon786 mentioned over and over. I still get an empty database. Every time it asks to do that installation I enter:
    database name: gardewine
    user: root
    password: root
    DB host: localhost
    Everytime it gives me the error and the database remains empty.

    Please follow the link for solution..
    Establishing a Database Connection Error Solution ways
    …..

    Mysql host should be localhost or 127.0.0.1 to run locally.

    Also, check if your mysql server is running and it is not blocked by the firewall.

Viewing 15 replies - 16 through 30 (of 35 total)
  • The topic ‘Error Establishing a Database Connection on Local Server’ is closed to new replies.