It looks like that my SQL is not started yet or something like that.
The error code is:
Code: Select all
Traceback (most recent call last):
File "/home/ewh/webserver.py", line 75, in <module>
con = mdb.connect('127.0.0.1', 'pi', 'raspberry', 'tempdb');
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.OperationalError: (2003, "Can't connect to MySQL server on '127.0.0.1' (111)")
Is there something I can do to avoid this?