]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Move docs in mysql dbapi
authorFederico Caselli <cfederico87@gmail.com>
Wed, 11 Jan 2023 19:33:16 +0000 (20:33 +0100)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 12 Jan 2023 16:47:34 +0000 (11:47 -0500)
Fixes: #9084
Change-Id: I5e174c318a20b7fcb5ea7c771293c5102e761ed7
(cherry picked from commit a06cd94baab114cd0b2fa0987267e31811d38f7a)

lib/sqlalchemy/dialects/mysql/mysqldb.py
lib/sqlalchemy/dialects/mysql/pymysql.py

index 9e31f4ba2af568e7cafa948d772a3f118777bd0f..7eef518549942aa85ea0f22ce2fd6b36431d817a 100644 (file)
@@ -63,19 +63,6 @@ where they will be interpreted into the "ssl" dictionary automatically:
         "&ssl_key=/home/gord/client-ssl/client-key.pem"
     )
 
-If the server uses an automatically-generated certificate that is self-signed
-or does not match the host name (as seen from the client), it may also be
-necessary to indicate ``ssl_check_hostname=false``::
-
-    connection_uri = (
-        "mysql+pymysql://scott:tiger@192.168.0.134/test"
-        "?ssl_ca=/home/gord/client-ssl/ca.pem"
-        "&ssl_cert=/home/gord/client-ssl/client-cert.pem"
-        "&ssl_key=/home/gord/client-ssl/client-key.pem"
-        "&ssl_check_hostname=false"
-    )
-
-
 .. seealso::
 
     :ref:`pymysql_ssl` in the PyMySQL dialect
index 5e234fbec1ff0775d4756f49dff63e4b2aacedd7..3a776f8775ed63c18f011e6fb67a99fc3109a8ee 100644 (file)
@@ -25,7 +25,19 @@ SSL Connections
 ------------------
 
 The PyMySQL DBAPI accepts the same SSL arguments as that of MySQLdb,
-described at :ref:`mysqldb_ssl`.   See that section for examples.
+described at :ref:`mysqldb_ssl`.   See that section for additional examples.
+
+If the server uses an automatically-generated certificate that is self-signed
+or does not match the host name (as seen from the client), it may also be
+necessary to indicate ``ssl_check_hostname=false`` in PyMySQL::
+
+    connection_uri = (
+        "mysql+pymysql://scott:tiger@192.168.0.134/test"
+        "?ssl_ca=/home/gord/client-ssl/ca.pem"
+        "&ssl_cert=/home/gord/client-ssl/client-cert.pem"
+        "&ssl_key=/home/gord/client-ssl/client-key.pem"
+        "&ssl_check_hostname=false"
+    )
 
 
 MySQL-Python Compatibility