MYSQL access works on Server as LOCALHOST but not from PC?
MYSQL access works on Server as LOCALHOST but not from PC?
am 03.11.2007 11:57:37 von martin99
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';
$conn=@mysql_connect($sqlhost,$sqluser,$sqlpass) OR die("Could not
cONNECT : " . mysql_errno().": ".mysql_error()."
");
$rs=@mysql_select_db($sqldb, $conn) or die("Could not select the
database");
?>
<<>>
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)
Re: MYSQL access works on Server as LOCALHOST but not from PC?
am 03.11.2007 14:45:54 von Jerry Stuckle
martin99 wrote:
> 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';
>
>
> $conn=@mysql_connect($sqlhost,$sqluser,$sqlpass) OR die("Could not
> cONNECT : " . mysql_errno().": ".mysql_error()."
");
> $rs=@mysql_select_db($sqldb, $conn) or die("Could not select the
> database");
> ?>
>
> <<>>
>
> 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)
>
>
Very simple. You don't have access to MySQL.
To figure out why, try asking in comp.databases.mysql.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: MYSQL access works on Server as LOCALHOST but not from PC?
am 03.11.2007 15:46:58 von Courtney
Jerry Stuckle wrote:
> martin99 wrote:
>> 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';
>>
>>
>> $conn=@mysql_connect($sqlhost,$sqluser,$sqlpass) OR die("Could not
>> cONNECT : " . mysql_errno().": ".mysql_error()."
");
>> $rs=@mysql_select_db($sqldb, $conn) or die("Could not select the
>> database");
>> ?>
>>
>> <<>>
>>
>> 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)
>>
>>
>
> Very simple. You don't have access to MySQL.
>
> To figure out why, try asking in comp.databases.mysql.
>
Hint. Default MySql does NOT allow remote database access. Needs setting
up. At the whole database level, and possibly at user and table level.
Take your time.
Re: MYSQL access works on Server as LOCALHOST but not from PC?
am 03.11.2007 17:43:27 von Jerry Stuckle
The Natural Philosopher wrote:
> Jerry Stuckle wrote:
>> martin99 wrote:
>>> 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';
>>>
>>>
>>> $conn=@mysql_connect($sqlhost,$sqluser,$sqlpass) OR die("Could not
>>> cONNECT : " . mysql_errno().": ".mysql_error()."
");
>>> $rs=@mysql_select_db($sqldb, $conn) or die("Could not select the
>>> database");
>>> ?>
>>>
>>> <<>>
>>>
>>> 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)
>>>
>>>
>>
>> Very simple. You don't have access to MySQL.
>>
>> To figure out why, try asking in comp.databases.mysql.
>>
> Hint. Default MySql does NOT allow remote database access. Needs setting
> up. At the whole database level, and possibly at user and table level.
> Take your time.
>
>
>
Hint - that's not his problem. But the folks in comp.databases.mysql
will give him the correct answer.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: MYSQL access works on Server as LOCALHOST but not from PC?
am 03.11.2007 18:26:44 von Courtney
Jerry Stuckle wrote:
> The Natural Philosopher wrote:
>> Jerry Stuckle wrote:
>>> martin99 wrote:
>>>> 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';
>>>>
>>>>
>>>> $conn=@mysql_connect($sqlhost,$sqluser,$sqlpass) OR die("Could not
>>>> cONNECT : " . mysql_errno().": ".mysql_error()."
");
>>>> $rs=@mysql_select_db($sqldb, $conn) or die("Could not select the
>>>> database");
>>>> ?>
>>>>
>>>> <<>>
>>>>
>>>> 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)
>>>>
>>>>
>>>
>>> Very simple. You don't have access to MySQL.
>>>
>>> To figure out why, try asking in comp.databases.mysql.
>>>
>> Hint. Default MySql does NOT allow remote database access. Needs
>> setting up. At the whole database level, and possibly at user and
>> table level. Take your time.
>>
>>
>>
>
> Hint - that's not his problem.
It is.
But the folks in comp.databases.mysql
> will give him the correct answer.
>
Re: MYSQL access works on Server as LOCALHOST but not from PC?
am 03.11.2007 19:12:39 von Jerry Stuckle
The Natural Philosopher wrote:
> Jerry Stuckle wrote:
>> The Natural Philosopher wrote:
>>> Jerry Stuckle wrote:
>>>> martin99 wrote:
>>>>> 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';
>>>>>
>>>>>
>>>>> $conn=@mysql_connect($sqlhost,$sqluser,$sqlpass) OR die("Could not
>>>>> cONNECT : " . mysql_errno().": ".mysql_error()."
");
>>>>> $rs=@mysql_select_db($sqldb, $conn) or die("Could not select the
>>>>> database");
>>>>> ?>
>>>>>
>>>>> <<>>
>>>>>
>>>>> 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)
>>>>>
>>>>>
>>>>
>>>> Very simple. You don't have access to MySQL.
>>>>
>>>> To figure out why, try asking in comp.databases.mysql.
>>>>
>>> Hint. Default MySql does NOT allow remote database access. Needs
>>> setting up. At the whole database level, and possibly at user and
>>> table level. Take your time.
>>>
>>>
>>>
>>
>> Hint - that's not his problem.
>
> It is.
>
>
> But the folks in comp.databases.mysql
>> will give him the correct answer.
>>
>
Wrong. Find out in comp.databases.mysql.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================