• Hey everyone,

    I’m having an issue with a fresh install of wordpress.

    The exact steps I have taken:
    * installed xampp to c:\xampp
    * when starting the apache server I was getting a duplicate port error. So I changed the httpd.conf and httpd-ssl.conf to point to port 8080 and 4433 respectively. The apache server then started with out any issues.
    * made a folder called “wordpress” in the htdocs directory and copied the contents of my wordpress download into it.
    * created a blank database in mysql with a user that has all CRUD and schema alteration permissions.
    * renamed the sample config to just wp-config.php
    * changed database details
    > DB_HOST = localhost:8080
    > DB_COLLATE = utf8_general_ci
    * open “https://localhost:8080/wordpress/wp-admin/install.php” in the browser, proceeds to hang until timeout. Changed timeout to 300 seconds.

    When trying to set DB_HOST to localhost:3306 I get a “Error establishing a database connection” message.

    Not really sure what I’m missing here.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    First, me personally, I’m using Laragon instead XAMPP. I used to use XAMPP or WampServer, but now switched to Laragon because it’s easier and more time-saving. Of course it’s not the case, but you should try it.

    To install WordPress normally (like most people do), you don’t have to rename the sample config or ‘wp-config-sample.php’ to ‘wp-config.php’. Just open the URL e.g “https://localhost:8080/wordpress/” and it will be redirected to “https://localhost:8080/wordpress/wp-admin/setup-config.php”, there you fill the requirement fields.

    But it seems you are installing WordPress manually by doing what’s been stated here:
    https://www.ads-software.com/support/article/how-to-install-wordpress/ (From Step 1 to Step 5)

    The error of “Error establishing a database connection” is telling you that for some reason the PHP code was unable to connect with your MySQL database. And this error mostly caused by incorrect details in your ‘wp-config-sample.php’.

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

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

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

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

    Have you tried just put ‘localhost’ for the DB_HOST instead? or ‘localhost:3306’ (becasuse it’s the port that your MySQL is referring to by default)

    Let me know

    3306 is default port for MySQL, You just need to enter ‘localhost’ as used in default wp-config.php file.

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

    Hi,
    My suggestion is using “Local by Flywheel

    You don’t need to install/extra modification on the environment.

    Local has built in WordPress. Read that and follow.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘install.php’ is closed to new replies.