Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Technowise/115d38fd6595d11513eb355349265237 to your computer and use it in GitHub Desktop.
Save Technowise/115d38fd6595d11513eb355349265237 to your computer and use it in GitHub Desktop.
import mysql.connector
#CA Bundle file is provided on AWS documentation for RDS: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html
#Link: https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem
SSL_CA='rds-combined-ca-bundle.pem'
cnx = mysql.connector.connect(user='db-user', password='xxxx',
host='xxxx.xxxx.us-west-2.rds.amazonaws.com',
database='db-user', ssl_ca=SSL_CA)
cnx.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment