title: Google Cloud Function with Google Cloud SQL: Python SQLalchemy engine works, but connection fails
body: <p>I have a simple test script to ensure I can connect to and read/write using GCF to Google Cloud SQL instance.</p>
  <pre><code>def update_db(request):
  
      import sqlalchemy
  
      # connect to GCP SQL db
      user = 'root'
      pw = 'XXX'
      conn_name = 'hb-project-319121:us-east4:hb-data'
      db_name = 'Homebase'
  
      url = 'mysql+pymysql://{}:{}@/{}?unix_socket=/cloudsql/{}'.format(user,pw,db_name,conn_name)
      engine = sqlalchemy.create_engine(url,pool_size=1,max_overflow=0)
  
      # Returns
      return f'Success'
  </code></pre>
  <p>This is successful but when I try to add a connection:</p>
  <p><code>conn = engine.connect()</code></p>
  <p>I get the following error:</p>
  <p><code>pymysql.err.OperationalError: (1045, &quot;Access denied for user 'root'@'cloudsqlproxy~' (using password: YES)&quot;)</code></p>
  <p>Seems odd that engine can be created but no connection can be made to it? Worth noting that any kind of <code>execute</code> using the engine, e.g. <code>engine.execute('select * from table limit 3')</code> will also lead to the error above.</p>
  <p>Any thoughts are appreciated. Thanks for your time</p>
  <p>Cheers,
  Dave</p>