469,963 Members | 2,761 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,963 developers. It's quick & easy.

Query Across DBs in MySQL

Hi

I'm new to MySQL and am wanting to be connected to the MySQL server and
query across diffrent db's. To my understanding a different db in MySQL
is the same as a schema in Oracle. Am I correct in this thinking?

What I want is to have one DB called projects which has common tables
such as contact_details, postal_codes, language and so on. Then a
number of other db's for different projects. Then project1 has its own
tables but can also see those in the projects db.

Any help with this would be greatly appriciated.

Thanks
Melissa

Oct 9 '05 #1
3 1589
>I'm new to MySQL and am wanting to be connected to the MySQL server and
query across diffrent db's. To my understanding a different db in MySQL
is the same as a schema in Oracle. Am I correct in this thinking?

What I want is to have one DB called projects which has common tables
such as contact_details, postal_codes, language and so on. Then a
number of other db's for different projects. Then project1 has its own
tables but can also see those in the projects db.


In general, if you can put a table name somewhere in a query, you
can also put databasename.tablename in that place to refer to a
table in a different database. MySQL access permissions still apply
(and checking this might slow things down by a tiny bit, but probably
not by much) so you have to have a login granted access to all of
the tables involved. The MySQL privilege system easily handles
having logins with access to their own database plus (possibly
read-only) access to a common database.

Gordon L. Burditt
Oct 9 '05 #2
Thanks for the help.
I am wanting to do these queries without having to out the db name into
the query sting.

I know that this is possible in oracle. You can grant privledges to
across different schemas.

Thanks

Oct 10 '05 #3
>Thanks for the help.
I am wanting to do these queries without having to out the db name into
the query sting.
How, then, do you intend to specify where the "other" database IS?
I know that this is possible in oracle. You can grant privledges to
across different schemas.


Granting privileges is something different from saying which other
database you want to use.

Gordon L. Burditt
Oct 10 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Rigga | last post: by
reply views Thread by PW | last post: by
10 posts views Thread by Jerim79 | last post: by
2 posts views Thread by DavidPr | last post: by
1 post views Thread by rainxy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.