I use this gramex.yaml
to configure the MySQL database connected to OTP:
otp: url: 'mysql+pymysql://$USER:$PASS@$MYSQL_SERVER/$DB' table: $TABLE
When Gramex starts, it reports an exception:
InternalError: (pymysql.err.InternalError) (3159, 'Connections using insecure transport are prohibited while --require_secure_transport=ON.')
This answer suggests passing a dummy ssl:
dictionary.
How to pass it to Gramex's FormHandler?
There are two possibilities. If you don't have an SSL certificate to connect to the database, use:
If you have an SSL CA certificate in PEM format, use:
You can pass any additional parameters to the pymysql connection object .