I just noticed that when you try to execute a query that does not have required permissions (only tested on a mysql 5.7 database using the mysql-connector-java v8 driver) it is translated to a org.springframework.jdbc.BadSqlGrammarException. This is because the mysql driver itself throws a java.sql.SQLSyntaxErrorException. For instance: java.sql.SQLSyntaxErrorException: INSERT command denied to user ‘myuser’@’127.0.0.1’ for table ‘mytable’ Is this correct
Tag: mysql-connector
How to reduce the cold start time when using MySQL with Lambda?
I am trying to deploy a REST API with Java, using AWS Lambda, API Gateway and Amazon RDS (MySQL). Below is my Lambda class My pom file Now, checkout the loading time tracked from X Ray, which we usually call as cold start It looks like the init process takes time. When further observed, I noticed most of the time
Connect to remote MySQL database through SSH using Java
How can I connect to remote MySQL database through SSH from java application? Small code example is helpful for me and I’d appreciate this. Answer My understanding is that you want to access a mysql server running on a remote machine and listening on let’s say port 3306 through a SSH tunnel. To create such a tunnel from port 1234