Hi all fellow Java Geeks,
I have lots of stored procedures in a MySQL database, which I can call successfully from .NET. However, when calling them from Java Spring SimpleJdbcCall.execute() I get an exception telling me that the user doesn’t have the privilege to do so. But that is clearly not the case since the same user can access it both from CLI and .NET.
I would therefore like to set this parameter:
noAccessToProcedureBodies=true
However, when adding the parameter in my url in the connector bean below, it thinks that the trailing characters are a part of the database name.
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName">
<value>com.mysql.jdbc.Driver</value>
</property>
<property name="username">
<value>user</value>
</property>
<property name="url">
<value>jdbc:mysql://192.168.0.1:3306/database/?noAccessToProcedureBodies=true</value>
</property>
<property name="password">
<value>powerpass</value>
</property>
</bean>
I have been looking at overriding the getConnectionProperties method, but I don’t think that’s the right approach?
Thanks all
I found an answer myself, and it’s working.
Instead of having an ending slash
"database/?noAccess..."one should leave it:Hope that help someone!