gpt4 book ai didi

MySQL语法错误异常 : Error while upgrading MySQL version

转载 作者:行者123 更新时间:2023-12-01 21:48:21 29 4
gpt4 key购买 nike

当我使用连接器版本 5.1.48 将 MySQL 版本从 5.7.22 升级到 8.0.18 时,我在查询中遇到以下错误:

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

查询如下:

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 = ?

帮我解决这个问题。提前谢谢你。

最佳答案

Keywords and Reserved Words

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

报价。或者升级到 8.0.19。

关于MySQL语法错误异常 : Error while upgrading MySQL version,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59950204/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com