11.3 Run Spark
$SPARK_HOME/bin/spark-shell
"DBCP" plugin to create a ConnectionPool gave an error : The specified datastore driver ("com.mysql.jdbc.Driver") was not found in the CLASSPATH
bin/spark-sql --jars /opt/hive/lib/mysql-connector-java-5.1.39-bin.jar
bin/spark-shell --jars /opt/hive/lib/mysql-connector-java-5.1.39-bin.jar
To fix this, find out the mysql-connectior-jave....jar in hive library and add it into SPARK_CLASSPATH
Now run the spark-shell directly, error is gone: