catalyst2 community forums  

Go Back   catalyst2 community forums > Support > Database Support

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old 21-05-2005, 02:52 PM   #1 (permalink)
web/accordion programmer
 
JoeWass's Avatar
 
Join Date: Apr 2004
Location: A London Suburb...
Posts: 101
Send a message via MSN to JoeWass
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?
JoeWass is offline   Reply With Quote
Old 21-05-2005, 02:59 PM   #2 (permalink)
rob
Resident NetOp/*nix Geek
 
rob's Avatar
 
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
rob is offline   Reply With Quote
Old 21-05-2005, 03:04 PM   #3 (permalink)
web/accordion programmer
 
JoeWass's Avatar
 
Join Date: Apr 2004
Location: A London Suburb...
Posts: 101
Send a message via MSN to JoeWass
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...
JoeWass is offline   Reply With Quote
Old 21-05-2005, 04:32 PM   #4 (permalink)
rob
Resident NetOp/*nix Geek
 
rob's Avatar
 
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
rob is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 10:33 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.