I had some strange problems like this with MySQL and PHP also. I can't really tell you what to do. The way I worked it was by creating a Database Class that extended a class of constants in which I have constants for the datatbase name, hostname, userid, and password (probably not the most secure solution, but easy to update). Have you tried taking the quotes off of the variables you pass into the functions? >$db = mysql_connect("mysql.addr.com", -->"$userid", -->"$password"); >mysql_select_db(-->"$database",$db); -----Original Message----- From: CDitty [mailto:mail at redhotsweeps.com] Sent: Wednesday, February 26, 2003 5:42 PM To: thelist at lists.evolt.org Subject: [thelist] MYSQL Connecting problems Hello all. I am getting this error when I try to make a connection to the mysql database. Can't connect to local MySQL server through socket 'please specify mysql.addr.com as the hostname' (2) This is my connection string. $db = mysql_connect("mysql.addr.com", "$userid", "$password"); mysql_select_db("$database",$db); I have verified the database server is correct. The user id and password is correct. Can anyone offer any advice? I have never come across this error that could not be fixed. Scripts in another directory work fine using this same database server address. Anyone? CDitty -- * * Please support the community that supports you. * * http://evolt.org/help_support_evolt/ For unsubscribe and other options, including the Tip Harvester and archives of thelist go to: http://lists.evolt.org Workers of the Web, evolt !