Say I have two databases, db1 and db2, and I have full privileges to access them.
But when I output 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.tbl1exists. Mysql seems to automatically add the database name as a prefix. What am I doing wrong?
source
share