Support » Installing WordPress » localhost does not work, host supplies “simple script”

  • I have installed WP onto my server. I have created and started a new MySQL DB. I tried to modified the wp-config.php using “localhost”, but the install.php could not find the running db. I called the hosting service and they said I cannot use “localhost”, but have to use a “simple connection script” instead. They emailed me the script, which is below. they also said I could try using the IP address to the db, which I did, but that did not take either.

    I do not understand how to impliment this “simple connection script”it into the wp-config.php file so the install.php will be able to connect to the bd. s

    Thanks for any guidance.


    Simple Connection for MySQL Database

    If a customer states that they can not connect to their MySQL Database and are receiving an error similar to the following:

Warning: mysql_connect(): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2) in /data/1/0/0/00/123/user/555/htdocs/file.php on line 86

Check that they are not using “localhost” and instead are using the MySQL IP Address.

mysql_select_db (“database”);


mysql_select_db (“database”);

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Samuel Wood (Otto)

    (@otto42) Admin

    All you need is right there.


    translates to:
    define('DB_NAME', 'db_name');
    define('DB_USER', 'username');
    define('DB_PASSWORD', 'password');
    define('DB_HOST', '');

    Thanks, as it turns out the hosting service sent me the wrong IP address?#$%&

    I appreciate your fast response, I am all set.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘localhost does not work, host supplies “simple script”’ is closed to new replies.