• Hello,

    I am trying to install WP on my local PC and have inserted all values (user,pass, DB name, localhost) in wp-config.php but while installation following errors are occuring

    This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at DB_HOST. This could mean your host’s database server is down.

    * Are you sure you have the correct username and password?
    * Are you sure that you have typed the correct hostname?
    * Are you sure that the database server is running?

    My database is running but i dont know why it is happning please advice.

    Regards,
    Bilal Ahmed

Viewing 5 replies - 1 through 5 (of 5 total)
  • we can’t contact the database server at DB_HOST

    You need to provide an actual server address. You say that you’ve edited wp-config but it looks like you’ve made a mistake. If your web server and your MySQL server are on the same machine usually simply ‘localhost’ will work– like this:

    /** MySQL hostname */
    define('DB_HOST', 'localhost');

    I have the same problem.

    username and password:
    I have to change the details for the username and password in the config file so i dont think i have the wrong details ( i made them up myself, i can use whatever i like i think).

    host:
    For my host i used: /** MySQL hostname */
    define(‘DB_HOST’, ‘localhost’); because i am using WAMP on my pc.

    Databaseserver running:
    Yes its running, WAMP

    After this I try to open https://localhost/wp-admin/install.php but then I get these error-messages. Don’t know how to fix it, maybe somone can help me thanks!!

    regards

    I have the same problem

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

    Error establishing a database connection

    Database server is running.

    Anybody?

    My problem is solved.

    Check your config file for the following!

    Check that the first line contains nothing but <?php, and that there is no text before it (not even whitespace).
    Check that the last line contains nothing but ?>, and that there is no text after it (not even whitespace).

    @ FRO8

    i dont think i have the wrong details ( i made them up myself, i can use whatever i like i think).

    You can make up whatever you like so long as the MySQL server knows about it. That is, you have to create a MySQL user first, then put that information into wp-config. You can’t just put anything you want into wp-config and expect MySQL to accept/create the username.

    For my host i used: /** MySQL hostname */
    define(‘DB_HOST’, ‘localhost’); because i am using WAMP on my pc.

    Sounds right, unless WAMP has peculiar requirements and I’m not sure about that.

    then I get these error-messages.

    What error messages?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Install WP on local PC (Problem)’ is closed to new replies.