.. versionadded:: 0.7.8
- .. deprecated:: 1.0 Cloud SQL now recommends creating connections via the
+ .. deprecated:: 1.0 This dialect is **no longer necessary** for
+ Google Cloud SQL; the MySQLdb dialect can be used directly.
+ Cloud SQL now recommends creating connections via the
mysql dialect using the URL format
- `mysql://root@/<dbname>?unix_socket=/cloudsql/<projectid>:<instancename>`
+
+ `mysql+mysqldb://root@/<dbname>?unix_socket=/cloudsql/<projectid>:<instancename>`
Pooling
warn_deprecated(
"Google Cloud SQL now recommends creating connections via the "
- "mysql dialect using the URL format "
- "mysql://root@/<dbname>?unix_socket=/cloudsql/<projectid>:<instancename>"
+ "MySQLdb dialect directly, using the URL format "
+ "mysql+mysqldb://root@/<dbname>?unix_socket=/cloudsql/<projectid>:<instancename>"
)
to unicode conversion, a feature which is disabled via ``use_unicode=0``.
It is strongly advised to use the latest version of MySQL-Python.
+Using MySQLdb with Google Cloud SQL
+-----------------------------------
+
+Google Cloud SQL now recommends use of the MySQLdb dialect. Connect
+using a URL like the following::
+
+ mysql+mysqldb://root@/<dbname>?unix_socket=/cloudsql/<projectid>:<instancename>
+
"""
from .base import (MySQLDialect, MySQLExecutionContext,