Forums

Error message when accessing mysql-db?

Hello - when i run my python-script i get an error when trying to define the sql_connector: mysql.connector.errors.InterfaceError: 2003: Can't connect to MySQL server on 'nl1-ss18.a2hosting.com:3306' (111 Connection refused)

When i connect from my local machine the connection works without problems.

Is there something i have to enable in pythonanywhere to have also access to an external mysql-db?

Free accounts on PythonAnywhere can only make connections to external servers over HTTP and HTTPS, and can only access sites on our whitelist.

Paid accounts have unrestricted Internet access.