Skip to content

Commit

Permalink
Merge pull request #38 from thecicco/master
Browse files Browse the repository at this point in the history
Add option for SSL (default 0)
  • Loading branch information
lefred committed Jun 9, 2022
2 parents 865f430 + 8c0f467 commit b0ceac2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions proxysql/proxysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def __init__(self, uri=False):
self.max_transaction_behind = 100
self.monitor_user = "monitor"
self.monitor_pwd = "monitor"
self.use_ssl = 0
self.uri = uri

self.user = shell.parse_uri(self.uri)['user']
Expand Down Expand Up @@ -116,8 +117,8 @@ def configure(self, session=None):
print("ERROR: you need to be connected to a InnoDB Cluster")
return
for host in self.members:
stmt = """REPLACE INTO mysql_servers(hostgroup_id,hostname,port)
VALUES (1,'%s',%d);""" % (host['host'], host['port'])
stmt = """REPLACE INTO mysql_servers(hostgroup_id,hostname,port,use_ssl)
VALUES (1,'%s',%d,%d);""" % (host['host'], host['port'], self.use_ssl)
self.session.run_sql(stmt)
stmt = """REPLACE into mysql_group_replication_hostgroups
(writer_hostgroup, backup_writer_hostgroup,
Expand Down

0 comments on commit b0ceac2

Please sign in to comment.