question
Executing spark-submit on linux reports an error that the driver cannot be found, but I can run it on the local idea, excluding code problems, it may be that linux does not place the mysql driver jar package
Solution
- Find JAVA_HOME first
which java
- enter ext
cd ~/jdk1.8.0_171/jre/lib/ext
- Place the mysql driver jar package in this folder
- Re-run