• Did a local install on my computer and can’t connect to the database.

    Because I will be doing more than one site, I installed WP in c:\xampp\htdocs\site1 where it exists as
    C:\xampp\htdocs\site1\Wordpress.

    Created mysql database with db_name, db_user, db_password and gave myself all priveledges.

    Changed wp-config-sample.php to wp-config.php.

    Changed/checked/confirmed db_name, db_user, db_password to be correct within wp-config.php many times.

    Toggled db_host between ‘localhost’ and ‘127.0.0.1’ with no effect.

    Started Apache & MySQL within XAMPP control panel.

    Did hav to change a port from 8080 to 8081 (TomCat7 I believe)- I had a conflict with a Samsung device using port 8080.

    Get the “Error establishing a database connection” when going to 127.0.0.1/Site1/wordpress/wp-admin/install.php in browser.

    Same error when trying 127.0.0.1/Site1/wordpress/wp-login.php.

    I suspect I have a path problem.

    Any help would be appreciated. On this for 2 days now.

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter tporada

    (@tporada)

    Not resolved but interesting – still would like to understand what is going on.
    Again this is a local install for now.
    Went back and changed user & password to the default and was able to install and login.
    Something in the username and password created within MYSQL did not get passed thru. Don’t understand.

    I’m not sure what user and password you created or were using, but by default when using XAMPP for a local site your connection (as root) would be as follows:

    define(‘DB_NAME’, ‘wordpress’); // The name of the database
    define(‘DB_USER’, ‘root’); // Your MySQL username
    define(‘DB_PASSWORD’, ”); // …and password
    define(‘DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘local install problem, using XAMPP’ is closed to new replies.