Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Query Across DBs in MySQL
October 9, 2005, 7:00 pm
rate this thread
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.
Re: Query Across DBs in MySQL
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
- » Americanas.com SALDO de TVs Com at 80% de Desconto (29798)
- — Newest thread in » MySQL Database Forum