Error: select command denied to user ''@'' for table ''
前端 未结 14 1492
被撕碎了的回忆
被撕碎了的回忆 2020-11-27 16:30

In my website, I am using MySQL database. I am using a webservice where in I do all my database related manipulations.

Now In one of the methods of that webservice,

14条回答
  •  有刺的猬
    2020-11-27 17:02

    Similar to other answers I had miss typed the query.

    I had -

    SELECT t.id FROM t.table LEFT JOIN table2 AS t2 ON t.id = t2.table_id
    

    Should have been

    SELECT t.id FROM table AS t LEFT JOIN table2 AS t2 ON t.id = t2.table_id
    

    Mysql was trying to find a database called t which the user didn't have permission for.

提交回复
热议问题