Simple pyspark code to read from mysql table and store in dataframe.
For connecting to mysql db we need to add driver jar into the spark folder. As I am running spark on local ubuntu OS, I added the driver jar at location :
"spark-3.0.1-bin-hadoop2.7/jars"
I am attaching the driver jar for Mysql 5 version to this repo as I am using it.