php remote login to mysql db

Nimbhoolo

New Member
trying to allow site1 to access a db on site2. site2 has site1 on the allow list for remote access.\[code\]<?phperror_reporting(E_ALL);ini_set('display_errors', '1');$host="host.com"; // Host name $username="user"; // Mysql username $password="pw"; // Mysql password $db_name="mydb"; // Database name $tbl_name="userCred"; // Table name // Connect to server and select databse. $link=mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB");?>\[/code\]i am getting the following error:
" Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'user'@'ans70.midphase.com' (using password: YES) in /home/site/public_html/subsite/remote.php on line 13"
 
Back
Top