문제

Consider this simple query:

SELECT * FROM table1 JOIN table2 USING(pid) WHERE pid='2' ;

I get this error:

1142: SELECT command denied to user 'root'@'localhost' for column 'pid' in table 'table1'

When I replace USING with ON (and this right syntax...) the error disappears.

What is the problem?

도움이 되었습니까?

해결책

The exception is saying that your database security is setup to not allow the user context being run under doesn't have access to that column. What permissions have been applied to that column?

Try to fix those permissions problems. Grant select permissions, or remove those deny permissions.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top