Say I have two databases db1 and db2, and I have full privileges to access them.
But when I issue the following sql:
SELECT * FROM `db1.tbl1` AS t1 JOIN `db2.tbl2` AS t2 ON t1.id=t2.id
I get this error:
Table `db1.db1.tbl1` doesn't exist.
db1.tbl1
does exist. It seems mysql automatically add database name as prefix. What am I doing wrong?