Support » Localhost Installs » Error establishing a database connection

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Did you create a database for WordPress? You need to do that in XAMPP.

    thank you for your responce,

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

    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.

    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’;

    ??

    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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Error establishing a database connection’ is closed to new replies.