On Mon, 2005-11-14 at 09:36 +0100, Tom Schindl wrote: > I'm uncertain what you are telling here because I can use different > databases while connected in a connection using the > > 1. Connect 2 DB (e.g. test) > 2. Query: SELECT * FROM db1.tab1 > 3. Query: SELECT * FROM db2.tab1 > > So there's no need to move all tables into one database, simply connect > always to one database and use fully qualified SQL-Statements >
There is one potential gotcha here, and that is if you are using master-slave replication on your MySQL database, with replication limited to certain databases. MySQL looks for the 'use db_name' statements to decide what to replicate, so, if you want to replicate db2, but not db1, and you do: use db1; update db2.table.... it won't do the right thing. You would specifically have to do: use db2 update db2.table OR update table For more details, see "--replicate-do-db=db_name" on http://dev.mysql.com/doc/refman/5.0/en/replication-options.html