python - How to establish a connection from a wxpython desktop app to a remote msyql database? -
i'm writing desktop app in wxpython. simplicity sake let's it's frame button in it. when clicks button record inserted remote mysql table public ip click made from.
create table clicks( click_id int(10) unsigned not null auto_increment, ip_address varchar(128), exec_datetime datetime, primary key(click_id) ) what best method establish connection remote mysql database , insert record desktop application?
one way wrap mysql calls in web service (api). clients make web requests webservice through http/s
creating web service allow control authorization/authentication of clients. (the wxpython app)
this can because port 80/443 (http/https) open. if connect directly mysql database using python, there possiblity port not open. also, using webservice can better throttle/control requests database, gives additional place cache used data, direct connection might not facilitate.
Comments
Post a Comment