Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Update</strong></p> <p>Google Cloud SQL now supports direct access, so the <code>MySQLdb</code> dialect can now be used. The recommended connection via the mysql dialect is using the URL format:</p> <pre><code>mysql+mysqldb://root@/&lt;dbname&gt;?unix_socket=/cloudsql/&lt;projectid&gt;:&lt;instancename&gt; </code></pre> <p><code>mysql+gaerdbms</code> has been deprecated in SQLAlchemy since version 1.0</p> <p>I'm leaving the original answer below in case others still find it helpful.</p> <hr> <p>For those who visit this question later (and don't want to read through all the comments), SQLAlchemy now supports Google Cloud SQL as of version 0.7.8 using the connection string / dialect (see: <a href="http://docs.sqlalchemy.org/en/rel_0_7/dialects/mysql.html#module-sqlalchemy.dialects.mysql.gaerdbms" rel="nofollow noreferrer">docs</a>):</p> <pre><code>mysql+gaerdbms:///&lt;dbname&gt; </code></pre> <p>E.g.:</p> <pre><code>create_engine('mysql+gaerdbms:///mydb', connect_args={"instance":"myinstance"}) </code></pre> <hr> <p>I have proposed an <a href="http://www.sqlalchemy.org/trac/ticket/2649" rel="nofollow noreferrer">update</a> to the <code>mysql+gaerdmbs://</code> dialect to support both of Google Cloud SQL APIs (<code>rdbms_apiproxy</code> and <code>rdbms_googleapi</code>) for connecting to Cloud SQL from a non-Google App Engine production instance (ex. your development workstation). The change will also modify the connection string slightly by including the project and instance as part of the string, and not require being passed separately via <code>connect_args</code>.</p> <p>E.g.</p> <pre><code>mysql+gaerdbms:///&lt;dbname&gt;?instance=&lt;project:instance&gt; </code></pre> <p>This will also make it easier to use Cloud SQL with Flask-SQLAlchemy or other extension where you don't explicitly make the <code>create_engine()</code> call.</p> <p>If you are having trouble connecting to Google Cloud SQL from your development workstation, you might want to take a look at my answer here - <a href="https://stackoverflow.com/a/14287158/191902">https://stackoverflow.com/a/14287158/191902</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload