py4j.protocol.Py4JJavaError: An error occurred while calling o45.load.
安装对应MySQL版本的Connector J 8.0(默认地址为C:\Program Files(x86)\MySQL\Connector J 8.0),再把这个文件夹下的mysql-connector-java-8.0.16.jar复制到spark安装目录下的jars文件夹下,这时候重启python程序,会报错如下的信息,You must configure either the server or JDBC driver (via the serverTimezone configuration property) ;再将程序中的url改为url="jdbc:mysql://localhost:3306/Databasename?characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8 "就可以正常运行了。