2

I'm trying to connect to a remote MySQL database and I'm running into this error

  "Lost connection to MySQL server during query (%s)" % (e,))
peewee.OperationalError: (2013, 'Lost connection to MySQL server during query ([Errno 10054] An existing connection was forcibly closed by the remote host)')

Here's the code

from peewee import *

print "connecting"
db = MySQLDatabase("mydb", user="myuser", passwd="crypticpassword!", port=someport, host="someremotehost.com")
db.connect()
print "connected"

so I figured, sure, let's try connecting without using code. I tried using Heidi, connecting through Microsoft SQL Server, and no problems whatsoever. Any ideas where I should look into to fix this?

Stupid.Fat.Cat
  • 10,755
  • 23
  • 83
  • 144

1 Answers1

-1

Make sure you have mysql downloaded How to install Python MySQLdb module using pip? Also import mysql

import MySQLdb
Community
  • 1
  • 1
Dap
  • 2,309
  • 5
  • 32
  • 44