Skip to content

Commit

Permalink
Fix disabling SSL for MySQL connection
Browse files Browse the repository at this point in the history
  • Loading branch information
pvannierop committed Jul 14, 2023
1 parent b3400e6 commit ea5252d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/src/main/scripts/migrate_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ def get_db_cursor(portal_properties):
connection_kwargs['db'] = portal_properties.database_name
if portal_properties.database_use_ssl == 'true':
connection_kwargs['ssl'] = {"ssl_mode": True}
connection_kwargs['ssl_mode'] = 'REQUIRED'
else:
connection_kwargs['ssl_mode'] = 'DISABLED'

connection = MySQLdb.connect(**connection_kwargs)
except MySQLdb.Error as exception:
Expand Down

0 comments on commit ea5252d

Please sign in to comment.