WordPress.org

Ready to get started?Download WordPress

Forums

Error establishing a database connection (6 posts)

  1. unicornwithoutahorn
    Member
    Posted 1 year ago #

    Hi everyone, this is my first post from my first attempt to make a site on wordpress. I downloaded wordpress and run the installation on my localhost using XAMPP. I think it's ok up to this step. then I visit my localhost and i get the "error" that i need to create the wp-config.php file, so i click on button and then i click the "Let's go" button. In the following screen, no matter what i write, I get the "Error establishing a database connection "

    There is no website as of yet because I really can't get this to install. Any help would be great.

  2. s_ha_dum
    Member
    Posted 1 year ago #

    Did you create a database for WordPress? You need to do that in XAMPP.

  3. unicornwithoutahorn
    Member
    Posted 1 year ago #

    thank you for your responce,

    i did, in phpmyadmin and i checked the users set as root/root.

  4. s_ha_dum
    Member
    Posted 1 year ago #

    What hostname are you using (DB_HOST in wp-config.php)? It should probably be localhost or 127.0.0.1.

    I don't know where ZAMPP keeps its files exactly but since PhpMyAdmin can connect if you can find it in the filesystem you can look at its config.inc.php and get the working connection credentials.

  5. unicornwithoutahorn
    Member
    Posted 1 year ago #

    wp-config.php is not created. i tried to create it manually but it didn't work. i located the config.inc.php of XAMPP. What should i look for? this:

    /* Bind to the localhost ipv4 address and tcp */
    $cfg['Servers'][$i]['host'] = '127.0.0.1';

    ??

  6. unicornwithoutahorn
    Member
    Posted 1 year ago #

    well, i kinda solved it. I quit XAMPP and localhost and went for a free hosting service. I uploaded everything, created a db etc and I'm installing successfully as we speak. Thank you for your time s_ha_dum.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.