title: How to use sparklyr spark_write_jdbc to connect to MySql
body: <pre><code>spark_write_jdbc(members_df,
      name = "Mbrs",
      options = list(
        url = paste0("jdbc:mysql://",mysql_host,":",mysql_port,"/",dbname),
        user = mysql_user,
        password = mysql_password),
      mode = "append")
  </code></pre>
  
  <p>Results in the following exception:</p>
  
  <pre><code>Error: java.sql.SQLException: No suitable driver
    at java.sql.DriverManager.getDriver(DriverManager.java:315)
  </code></pre>
  
  <p>The .jar file is in a folder on the server where RStudio is running, config details below. We're able to access MySql via the RMySql package so MySql is working and accessible.</p>
  
  <pre><code>config$`spark.sparklyr.shell.driver-class-path` &lt;- "/dev/shm/temp/mysql-connector-java-5.1.44-bin.jar"
  </code></pre>