Error: select command denied to user ”@” for table ”

I’m sure the original poster’s issue has long since been resolved. However, I had this same issue, so I thought I’d explain what was causing this problem for me.

I was doing a union query with two tables — ‘foo’ and ‘foo_bar’. However, in my SQL statement, I had a typo: ‘foo.bar’

So, instead of telling me that the ‘foo.bar’ table doesn’t exist, the error message indicates that the command was denied — as though I don’t have permissions.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)