By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,375 Members | 1,111 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,375 IT Pros & Developers. It's quick & easy.

Query Across DBs in MySQL

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
>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

P: n/a
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

P: n/a
>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.