Yes - prefix the table name with the name of the database. For example:
SELECT A.Field1, B.Field2
FROM db1.Table1 A INNER JOIN db2.Table2 B ON A.Field1=B.Field2
The 'A' and 'B' in the query are aliases - saves typing the table names continuously throughout the query.