I created a ubuntu 18.10 server and made it publicly available. I can access the url xx.x.xxx.xx / phpmyadmin , but when I try to connect through python3 I have the following problem:
pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on '86.6.210.16' ([WinError 10061] Nenhuma ligação pôde ser feita porque o computador de destino\r\nas recusou ativamente)")
When I access my local server (with xamp), I do not have this error, having made the connection in the same way.
Link:
mydb = pymysql.connect(host = "xx.x.xxx.xx",
user = "root",
passwd = "phpmyadmin",
database = "users")