![]() |
|
|
#1 (permalink) |
|
web/accordion programmer
|
am I being daft....
As regards accessing a mySQL db from a package other than the one it was bought with (I gather it's possible)....
FOR Example.... I buy a mySQL db for package 'Foo' and want to access it from package 'Bar'. All the connection I information I provide in the PHP is: server IP: pear db name: Fred username: Jim password: 1234 and I use something like $link = mysql_connect('pears ip', 'Jim', '1234'); $usedb = mysql_select_db("Fred", $link); all very well within the original package I'm assuming that all the mysql dbs are on one IP. SO... does the server only allow _globally_ unique db names ... I'm guessing not ... How does the server know which database I want when i'm pointing to from another package? That is to say, if I create database Fred with Jim as a user, how does the server know that I want /that/ database from package 'Bar'. Or is there only one fred on the whole of pear? I've explained that terribly badly. Or am I missing something terribly, terribly simple? |
|
|
|
|
|
#2 (permalink) |
|
Resident NetOp/*nix Geek
Join Date: Dec 2003
Posts: 223
|
I'm assuming that all the mysql dbs are on one IP. SO... does the server only allow _globally_ unique db names ... I'm guessing not ...
Database names are unique to the server that they're running on for Windows packages. This is the way that HELM manages it. At the moment I think the databases are globally unique as well, but this isn't directly by system design. How does the server know which database I want when i'm pointing to from another package? That is to say, if I create database Fred with Jim as a user, how does the server know that I want /that/ database from package 'Bar'. Or is there only one fred on the whole of pear? Due to server uniqueness, pear only has one "bar" database, and hence that's the only one you can access. Rob
__________________
Rob Shakir - rob@catalyst2.com |
|
|
|
|
|
#3 (permalink) |
|
web/accordion programmer
|
thanks
ahh that's quite encouraging then. Means I've not lost the plot after all. But interesting...
Thanks for your response. I would have played around with it a bit before asking but internet cafes being what they are on holiday... Also, is it possible to telnet to mysql command line in any way _at all_ ? I know it throws out garbage if you directly telnet it but ... is there a way round? do mysql provide a remote terminal binary? I hate using gui nonsense and passing a command string thru a form just ain't the same... |
|
|
|
|
|
#4 (permalink) |
|
Resident NetOp/*nix Geek
Join Date: Dec 2003
Posts: 223
|
Due to the way that HELM add the users (with a % mask), it is possible to access the server from anywhere. You can use the standard mysql client program (which is CLI) and just use -h 84.18.193.3 -u<your user> -p.
You can then manage your database. Rob
__________________
Rob Shakir - rob@catalyst2.com |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|