You are here: MYSQL access works on Server as LOCALHOST but not from PC? « PHP Programming Language « IT news, forums, messages
MYSQL access works on Server as LOCALHOST but not from PC?

Posted by martin99 on 11/03/07 10:57

Hi,

I can run a test scrip that connects to the and it CONNECTS
successfully whilst running from the my website on the server.

$sqlhost = 'localhost';
$sqluser = 'userid';
$sqlpass = 'password';
$sqldb = 'some_dbd';

<?php
$conn=@mysql_connect($sqlhost,$sqluser,$sqlpass) OR die("Could not
cONNECT : " . mysql_errno().": ".mysql_error()."<BR>");
$rs=@mysql_select_db($sqldb, $conn) or die("Could not select the
database");
?>

<<<PROBLEM>>>

I cant seem to get access to my SQL data (on the server) via running a
PHP script locally on my PC

But when I try and change the SQLHOST from "localhost" to a real URL
(ie something like www.website.com (etc)) its does nt like and gets

Could not CONNECT : 1045: Access denied for user
'userid'@'5ac4ba15.bb.sky.com' (using password: YES)

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация