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. CORRECT! mysql_connect(“XXX.XXX.XXX.XX”,”username”,”password”); mysql_select_db (“database”); —————————————– INCORRECT! mysql_connect(“localhost”,”username”,”password”); mysql_select_db (“database”);
- The topic ‘localhost does not work, host supplies “simple script”’ is closed to new replies.