Skip to content

Commit ff9a856

Browse files
joangrogguuss
authored andcommitted
Fix Cloud SQL example (MySQL) (#2309)
The sample has the wrong format for `unix_socket` inside the query parameter in sqlalchemy.create_engine. Doing: '/cloudsql/{}/'.format(cloud_sql_connection_name) takes the path as a directory so the ending slash needs to be removed: '/cloudsql/{}'.format(cloud_sql_connection_name)
1 parent 0ce1495 commit ff9a856

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cloud-sql/mysql/sqlalchemy/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
password=db_pass,
4444
database=db_name,
4545
query={
46-
'unix_socket': '/cloudsql/{}/'.format(cloud_sql_connection_name)
46+
'unix_socket': '/cloudsql/{}'.format(cloud_sql_connection_name)
4747
}
4848
),
4949
# ... Specify additional properties here.

0 commit comments

Comments
 (0)