how to connect remote server wordpress mysql via python

I am very new to mysql. I made server from amazon lightsail, linux wordpress instance. I know how to connect localhost mysql, so I tried same way. import pymysql connetion = pymysql.connect(host=’xxx.xxx.xxx.xxx’, port = 80 user=’userid’, password=’userpw’, db=’bitnami_wordpress’, charset=’utf8′,) c =connetion.cursor() c.execute(“SELECT * FROM ‘wp_db7_forms'”) result = c.fetchall() print(result) for host, tried my server public…