简体   繁体   English

无法从 JDBC 执行 MySQL 存储过程

[英]Can't execute a MySQL stored procedure from JDBC

Im trying to connect to the mariadb server in jdbc and call my stored procedure but im getting this error.我试图连接到 jdbc 中的 mariadb 服务器并调用我的存储过程,但我收到此错误。 Ive also tried:我也试过:

'''GRANT all ON mysql.proc TO 'Gruppe18'@'i3ED6FBF0.versanet.det';''' '''将 mysql.proc 上的所有内容授予 'Gruppe18'@'i3ED6FBF0.versanet.det';'''

but in mysql i got access denied error.但在 mysql 中,我收到拒绝访问错误。

And the server is from university so I dont have full access on it.而且服务器来自大学,所以我没有完全访问权限。

enter image description here在此处输入图像描述

The image shows that you're using named parameters, which means that the JDBC driver needs to query the meta-data of the stored procedure to learn what those parameters are.图像显示您正在使用命名参数,这意味着 JDBC 驱动程序需要查询存储过程的元数据以了解这些参数是什么。

Your user is not authorized to query that meta-data.您的用户无权查询该元数据。

Solution: Use positional parameters.解决方案:使用位置参数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM