MySqlRead.scala - Compilation error


1 Answer(s)


I believe you are working with Spark 2x then try this:

            val properties = new Properties()
            properties.setProperty("user","<username>")
            properties.setProperty("password","<password>")

           df.write.jdbc("jdbc:mysql://localhost:3306/ecommerce","sales",properties)

 

Regards,

Sakhuja