2

While I was upgrading MySQL version from 5.7.22 to 8.0.18 using connector version 5.1.48, I got following error in a query:

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'member on r.user_role_id = member.user_role_id left join action_permission p on' at line 1

Query is mentioned below:

select p.name 
from users u 
    left join user_role r on u.user_role_id = r.user_role_id 
    left join user_role_action_permission member on r.user_role_id = member.user_role_id 
   left join action_permission p on member.permission_id = p.permission_id 
where p.NAME = ? 
and u.USER_ID = ?

Help me in resolving this issue. Thank you in advance.

0

1 Answer 1

7

Keywords and Reserved Words

MEMBER; added in 8.0.17 (reserved); became nonreserved in 8.0.19

Quote. Or upgrade up to 8.0.19.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.