mysql - How to connect database from cPanel to Desktop in python -


i making application in python - , need connect web server database desktop.
how can this.

example:

if site xyz.com it's ip 123.134.121.136 , database name xyz_code , name xyz_alibaba , password !@#!#1&#a#@

import mysqldb mdb  s_h = "123.134.121.136:3306" s_u = "xyz_alibaba" s_p = "!@#!#1&#a#@" s_d = "softwar1_codexyz_code"  s_cn = mdb.connect(s_h, s_u, s_p, s_d)  if s_cn :     print "ok" else:     print "no" 

when run code shows unknown loaclhost error.

how can fix it?

have added isp ip in remote mysql host access list? , enable port 3306 in server firewall.


Comments