方法一:
cp /usr/local/hive/conf/hive-site.xml /usr/local/spark/conf/
./spark-shell --master local[2] --jars /usr/local/hive/lib/mysql-connector-java-5.1.45-bin.jar
方法二:
cp /usr/local/hive/lib/mysql-connector-java-5.1.45-bin.jar /usr/local/spark/jars/
./spark-shell --master local[2]
【来自@若泽大数据】