|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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 ?? Cheers, Mark. |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
MarkP <mark_paceyuk@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. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
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 ?? |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
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... |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
Good Man <heyho@letsgo.com> wrote in
news:Xns99B0B54044F57sonicyouth@216.196.97.131: >> 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... i was assuming PHP usage there, by the way. if you just want to use command line, just telnet/SSH to the other computer first and do it from there (mysql -u USERNAME -p) |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
On 19 Sep, 22:50, Good Man <he...@letsgo.com> wrote:
> Good Man <he...@letsgo.com> wrote innews:Xns99B0B54044F57sonicyouth@216.196.97.131: > > >> 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... > > i was assuming PHP usage there, by the way. if you just want to use > command line, just telnet/SSH to the other computer first and do it from > there (mysql -u USERNAME -p) Ok Cheers - the PHP side won't be affected as I can edit the files on the PC via the laptop. I think there is a permission issue, and I'll have a look as you said in the table. Just setting some new stuff at the mo - so I'm trying to access it via SQLYOG - just didn't know whether the ip address or name was enough to connect. I'll check the permission stuff out tomorrow. Cheers for the .. |
|
![]() |
| Outils de la discussion | |
|
|