View Full Version : Connection Error

11-27-2002, 12:16 PM
I am new to PHP and MySQL Databases.

I just inserted a poll to my website (The poll of www.proxy2.de). But it gives this error message:

MySQL Error : Connection Error
Error Number: 2002 Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46)

I suspect one of the reasons this may be happening is that I need to change Host names in the configuration files from "host" to "mysql".

But how do I know which files are configuration files among a variety of files? And how do I know what parts of the script to change.

Please advise.


11-27-2002, 02:42 PM
most scripts have a README or INSTALL file that contains config hints, if not look for a file with 'config' in the name, generally you will find one , if not look for a file with 'conn' or 'db' in the name, they are not usually that hard to find, alternately see if the place you got the script from has a help forum or FAQ.

11-27-2002, 08:49 PM

$POLLDB["dbName"] = "Database name";
$POLLDB["host"] = "localhost";
$POLLDB["user"] = "Your database username";
$POLLDB["pass"] = "Your database password";

That's all you need to change

11-28-2002, 04:08 AM
thanks a lot.

it was a lot easier than it seemed. I thought I was gonna have to work with all the files.