Problem connecting to remote MySQL Server

From: Date: Mon, 03 Nov 2003 17:16:19 +0000
Subject: Problem connecting to remote MySQL Server
Groups: php.general 
Request: Send a blank email to php-general+get-168402@lists.php.net to get a copy of this message
Hi, I am publishing a site I have developed and I am having problems with the scripts being able to access the remote MySQL server. When I try to connect using the PHP scripts I just get an error saying that access is denied. I can access it fine from my machine using PHPMyAdmin so I know that remote access is being allowed. I have also connected to the web hosting server via SSH and have connected successfully to the MySQL server via the MySQL client at the terminal from that machine. So I know the server that the scripts are running on also has access to the MySQL server. Here is my script. Please let me know if you have any ideas why this would be happening: ----------------------------------------- <?PHP /*********************************************************************** ************** * Connects to a MySQL database using the Belvedere account * ************************************************************************ *************/ function DBMS_CONNECT() { global $Site_Settings; // Connect To DBMS $Connection = mysql_connect($Site_Settings['DB_Host'], $Site_Settings['DB_UserName'], $Site_Settings['DB_Password']) or SQL_KillScript("Connecting to DBMS",$Connection); // Select DB if (!mysql_select_db($Site_Settings['DB_Name'],$Connection)) SQL_KillScript("Selecting Database",$Connection); // Return the connection variable return $Connection; } ?> ----------------------------------- Here is the error message: MySQL Error 1044 : Access denied for user: '**USER**@%' to database 'Belvedere' ----------------------------------- My DB_Host is specified as a domain name. e.g. db1.myhost.com

« previous php.general (#168402) next »