<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic AWS Databricks Pyspark - Unable to connect to Azure MySQL - Shows &amp;quot;SSL Connection is required&amp;quot; in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/aws-databricks-pyspark-unable-to-connect-to-azure-mysql-shows/m-p/19520#M13093</link>
    <description>&lt;P&gt;Even after specifying SSL options, unable to connect to MySQL. What could have gone wrong? Could anyone experience similar issues? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;df_target_master = spark.read.format("jdbc")\&lt;/P&gt;&lt;P&gt;.option("driver", "com.mysql.jdbc.Driver")\&lt;/P&gt;&lt;P&gt;.option("url", host_url)\&lt;/P&gt;&lt;P&gt;.option("dbtable", supply_master)\&lt;/P&gt;&lt;P&gt;.option("user", user_id)\&lt;/P&gt;&lt;P&gt;.option("password", pwd)\&lt;/P&gt;&lt;P&gt;.option("ssl", True) \&lt;/P&gt;&lt;P&gt;.option("sslmode", "verify-ca" ) \&lt;/P&gt;&lt;P&gt;.option("sslrootcert", "&amp;lt;s3 bucket location") \&lt;/P&gt;&lt;P&gt;.load()&lt;/P&gt;</description>
    <pubDate>Thu, 26 May 2022 14:22:11 GMT</pubDate>
    <dc:creator>Rexton</dc:creator>
    <dc:date>2022-05-26T14:22:11Z</dc:date>
    <item>
      <title>AWS Databricks Pyspark - Unable to connect to Azure MySQL - Shows "SSL Connection is required"</title>
      <link>https://community.databricks.com/t5/data-engineering/aws-databricks-pyspark-unable-to-connect-to-azure-mysql-shows/m-p/19520#M13093</link>
      <description>&lt;P&gt;Even after specifying SSL options, unable to connect to MySQL. What could have gone wrong? Could anyone experience similar issues? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;df_target_master = spark.read.format("jdbc")\&lt;/P&gt;&lt;P&gt;.option("driver", "com.mysql.jdbc.Driver")\&lt;/P&gt;&lt;P&gt;.option("url", host_url)\&lt;/P&gt;&lt;P&gt;.option("dbtable", supply_master)\&lt;/P&gt;&lt;P&gt;.option("user", user_id)\&lt;/P&gt;&lt;P&gt;.option("password", pwd)\&lt;/P&gt;&lt;P&gt;.option("ssl", True) \&lt;/P&gt;&lt;P&gt;.option("sslmode", "verify-ca" ) \&lt;/P&gt;&lt;P&gt;.option("sslrootcert", "&amp;lt;s3 bucket location") \&lt;/P&gt;&lt;P&gt;.load()&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 14:22:11 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/aws-databricks-pyspark-unable-to-connect-to-azure-mysql-shows/m-p/19520#M13093</guid>
      <dc:creator>Rexton</dc:creator>
      <dc:date>2022-05-26T14:22:11Z</dc:date>
    </item>
    <item>
      <title>Re: AWS Databricks Pyspark - Unable to connect to Azure MySQL - Shows "SSL Connection is required"</title>
      <link>https://community.databricks.com/t5/data-engineering/aws-databricks-pyspark-unable-to-connect-to-azure-mysql-shows/m-p/19522#M13095</link>
      <description>&lt;P&gt;@Rexton Das​&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you try disabling below SSL setting on MySQL Azure Database -&amp;gt; Connection Security and see if it connects?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1833i46EF3DD50DD79184/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2022 03:39:40 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/aws-databricks-pyspark-unable-to-connect-to-azure-mysql-shows/m-p/19522#M13095</guid>
      <dc:creator>User16764241763</dc:creator>
      <dc:date>2022-06-06T03:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: AWS Databricks Pyspark - Unable to connect to Azure MySQL - Shows "SSL Connection is required"</title>
      <link>https://community.databricks.com/t5/data-engineering/aws-databricks-pyspark-unable-to-connect-to-azure-mysql-shows/m-p/19523#M13096</link>
      <description>&lt;P&gt;Or you can try enabling SSL in the URL using &amp;amp;useSSL=true&amp;amp;requireSSL=true&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2022 03:42:08 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/aws-databricks-pyspark-unable-to-connect-to-azure-mysql-shows/m-p/19523#M13096</guid>
      <dc:creator>User16764241763</dc:creator>
      <dc:date>2022-06-06T03:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: AWS Databricks Pyspark - Unable to connect to Azure MySQL - Shows "SSL Connection is required"</title>
      <link>https://community.databricks.com/t5/data-engineering/aws-databricks-pyspark-unable-to-connect-to-azure-mysql-shows/m-p/19525#M13098</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here the solution: The correct option for ssl is "useSSL" and not just "ssl".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code below could works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;df_target_master = spark.read.format("jdbc")\&lt;/P&gt;&lt;P&gt;.option("driver", "com.mysql.jdbc.Driver")\&lt;/P&gt;&lt;P&gt;.option("url", host_url)\&lt;/P&gt;&lt;P&gt;.option("dbtable", supply_master)\&lt;/P&gt;&lt;P&gt;.option("user", user_id)\&lt;/P&gt;&lt;P&gt;.option("password", pwd)\&lt;/P&gt;&lt;P&gt;.option("&lt;B&gt;useSSL&lt;/B&gt;", True) \&lt;/P&gt;&lt;P&gt;.option("sslmode", "verify-ca" ) \&lt;/P&gt;&lt;P&gt;.option("sslrootcert", "&amp;lt;s3 bucket location") \&lt;/P&gt;&lt;P&gt;.load()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm able to access a mySQL with "Enforce SSL Connection" Enabled in Azure with only this change. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Databricks Runtime 11.2 and above you can use the MySQL connector in Databricks Runtime. The code could be like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;remote_table = (spark.read&lt;/P&gt;&lt;P&gt;  .format("mysql")&lt;/P&gt;&lt;P&gt;  .option("dbtable", table)&lt;/P&gt;&lt;P&gt;  .option("host", database_host_url)&lt;/P&gt;&lt;P&gt;  .option("port", 3306)&lt;/P&gt;&lt;P&gt;  .option("database", database_name)&lt;/P&gt;&lt;P&gt;  .option("user", uid)&lt;/P&gt;&lt;P&gt;  .option("password", pwd)&lt;/P&gt;&lt;P&gt;  .option("useSSL", True)&lt;/P&gt;&lt;P&gt;  .option("sslmode", "verify-ca" )&lt;/P&gt;&lt;P&gt;  .load()&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2023 14:34:56 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/aws-databricks-pyspark-unable-to-connect-to-azure-mysql-shows/m-p/19525#M13098</guid>
      <dc:creator>a2barbosa</dc:creator>
      <dc:date>2023-04-13T14:34:56Z</dc:date>
    </item>
  </channel>
</rss>

