Connect on remote MySQL database through Python

后端 未结 4 1550
栀梦
栀梦 2020-12-09 09:33

I have tried the following script but unfortunately doesn\'t work. I am using a free MySQL database provider. Any ideas?

import MySQLdb

myDB = MySQLdb.conne         


        
4条回答
  •  一整个雨季
    2020-12-09 10:05

    This is what I would do

    1. See if the port is actually open on that machine.
    2. On the machine you are connecting from, open console/cmd/terminal and see if you can connect using mysql -u XXXX -h 208.11.220.249 -p. If your mysql client can not connect, then there is no way you can connect using python

提交回复
热议问题