title: connecting mysql with pyspark
body: <p>I want to connect mysql with pyspark. I am using jupyter notebook to run pyspark. However when I do this,</p>
  
  <pre><code>dataframe_mysql = sqlContext.read.format("jdbc").options(
      url="jdbc:mysql://localhost:3306/playground",
      driver = "com.mysql.jdbc.Driver",
      dbtable = "play1",
      user="root",
      password="sp123").load()
  </code></pre>
  
  <p>I get an error as </p>
  
  <p>Py4JJavaError: An error occurred while calling o89.load.
  : java.lang.ClassNotFoundException: com.mysql.jdbc.Driver.</p>
  
  <p>How can I resolve this error and load mysql data in pyspark dataframe?</p>