Page 1 of 1

Connecting the RevPi to a remote database

Posted: 14 Jun 2019, 20:48
by JeffCalgary
Hello,

I am trying to connect the RevPi to a remote database. I have run this code to connect to a local database and it works. I have also run it on a VM and it makes the connection. Here is the error message:

python main.py
Traceback (most recent call last):
File "main.py", line 9, in <module>
db = MySQLdb.connect(server, username0,password0)
File "/usr/lib/python2.7/dist-packages/MySQLdb/__init__.py", line 81, in Connect
return Connection(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 187, in __init__
super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.InterfaceError: (-1, 'error totally whack'

Any ideas?