Hi, My database is at:
forsterc.mysql.pythonanywhere-services.com
Username: forsterc
Your databases: forsterc$dblight
My code:
import MySQLdb
db = MySQLdb.connect(
host = "forsterc.mysql.pythonanywhere-services.com",
user = "forsterc",
passwd = "*********",
db = "forsterc$dblight"
)
cursor = db.cursor()
cursor.execute("SELECT * FROM tbllight")
for x in cursor:
print(x)
cursor.close()
db.close()
Can't connect to server on 'forsterc.mysql.pythonanywhere-services.com' (10060)
Not sure why!