I have a Java program connection to a MySQL database, how can I change the current database to a different one on the same connection?
I connect to MySQL like this:<
You can prefix the database name on your table names like this.
For example: db1 has table1 and db2 has table2
db1 has table1
db2 has table2
select * from db1.table1, db2.table2;
This will allow you to do cross database queries