Using Scala, the below commands will work:
import org.apache.spark.sql.SQLContext
val sqlcontext = new org.apache.spark.sql.SQLContext(sc)
val dataframe_mysql = sqlcontext.read.format("jdbc").option("url", "jdbc:mysql://Public_IP:3306/YOUR_DB_NAME").option("driver", "com.mysql.jdbc.Driver").option("dbtable", "tblage").option("user", "your_user").option("password", "your_password").load()
dataframe_mysql.show()
If you want to know more about Spark, then do check out this awesome video tutorial: