I’m using Groovy sql library as following:
import groovy.sql.Sql
def url = 'jdbc:mysql://<host>:<port>/<db>'
def username = 'user'
def password = 'pass'
def driver = 'com.mysql.cj.jdbc.Driver'
def sql = Sql.newInstance(url, username, password, driver)
I also need to add ssl
parameter. When I use mysql
cli I have this flag added to login command --ssl-ca=/path/to/cert.pem
.
How can I add cert.pem
to Sql.newInstance
method?