Connecting to mysql with TLS

27 views
Skip to first unread message

Vlad

unread,
Oct 11, 2020, 2:47:16 PM10/11/20
to web2py-users
web2py 2.11.2 

Ok so I only need the CA to be validated. 

Providing the path to the CA file like:

DAL("mysql://remoteuser:password@remotedbserver/database", driver_args={'ssl':{'ca':'path/to/ca/file'}})

I get
"/path/to/web2py/gluon/contrib/pymysql/connections.py", line 822, in _send_authentication self.socket = ssl.wrap_self.socketet(self.socket, keyfile=self.key, AttributeError: 'module' object has no attribute 'wrap_self'

I know this was asked before, but there was no comment given on that, other than to work around it via SSH tunnel.

Not an alternative in my case, long story.

Vlad

unread,
Oct 11, 2020, 2:57:33 PM10/11/20
to web2py-users
in fact, I can connect via CLI with just adding "--ssl" to the standard client. 

Any way to achieve that with web2py DAL ?
Reply all
Reply to author
Forward
0 new messages