title: Need a working strategy to execute SQL scripts in Jenkins pipeline script
body: <p>As part of a Jenkins pipeline script, I need to execute some SQL scripts to initialize a database (mariadb).  This job runs on a Jenkins slave that I own.  I maintain the Jenkins master instance, but not the host it runs on.</p>
  
  <p>My first try was simply having inline code in the script to call "Sql.newInstance(...)" and "sql.execute(...)".  This fails because the mariadb jar is not in the classpath.</p>
  
  <p>I then tried setting the CLASSPATH env var for the slave, to add the mariadb client jar to it, then disconnecting and reconnecting the slave.  This appeared to have no effect.</p>
  
  <p>I then tried the @GrapeConfig/@Grab approach.  I used @GrapeConfig to set "systemClassLoader=true".  This fails with "Unable to find suitable classloader".  So, I then tried removing the @GrapeConfig, and this fails with "RuntimeException: Provider for class javax.xml.parsers.SAXParserFactory cannot be created".</p>
  
  <p>Next, I guess I'm going to try to directly run "mysql" from a "sh" command and pipe in the contents of my sql scripts.  This seems plausible, but I'm not sure if this will work.</p>
  
  <p>I've seen notes talking about various attempts to do this, but I've never heard of someone successfully doing this.</p>