Afficher un message
Vieux 19/09/2007, 22h48   #4
Good Man
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Accessing Database on another PC

MarkP <mark_paceyuk@yahoo.co.uk> wrote in news:1190238147.131461.129340
@r29g2000hsg.googlegroups.com:

> On 19 Sep, 22:33, Good Man <he...@letsgo.com> wrote:
>> MarkP <mark_pace...@yahoo.co.uk> wrote in news:1190237251.536182.67650
>> @r29g2000hsg.googlegroups.com:
>>
>> > Hey guys,

>>
>> > I've got a database set up on my local PC accessed as localhost. I
>> > want to be able to use something like SQLYOG to get to the database
>> > from a laptop on the same network. I guess the question is what form
>> > does the host field take if I'm trying to access the database from
>> > another PC / laptop ?? if my database is on a PC with a name of say
>> > PC1, what do I need to do to access it from the laptop ??

>>
>> Use the IP, it will be easier.

>
> Errr ok - but what's the syntax ??? do I literally just use the ip for
> the host with the localhost password ??
>
>


yeah, its the same syntax:

@ $db = mysql_connect("the.ip.address.here", "yourUserName",
"yourPassword");

you will need to make sure that the user has permission to connect to the
database from a computer that is not 'localhost'.... this can be done by
setting the "Host" column in the table "mysql" to "%" for your particular
user...


  Réponse avec citation
 
Page generated in 0,04726 seconds with 9 queries