1-702-818-1043
support@quotaguard.com
Login

    How to access a MySQL database using QuotaGuard Static IP and PythonAnywhere

    Author: QuotaGuard Team

    Approximate time to read: 1 min


    How to access a MySQL database using QuotaGuard Static IP and PythonAnywhere

    Are you trying to connect to a MySQL Database and PythonAnywhere recommended you reach out to QuotaGuard for help? You’ve come to the right place.

    To make this work easiest for new users, we created an example Python application which uses a monkeypatched version of mysql-connector-python through PySocks.

    You can find the example here: https://github.com/quotaguard/pymysql-example. Please read the README.md file for details on how to use the test application.

    Once you have tested that locally you should be able to integrate it into your application.

    You will need to install https://help.pythonanywhere.com/pages/InstallingNewModules/ the pips PySocks https://github.com/Anorov/PySocks and mysql-connector-python https://dev.mysql.com/doc/connector-python/en/.

    You will also need to set the environment variable https://help.pythonanywhere.com/pages/environment-variables-for-web-apps/ for QUOTAGUARDSTATIC_URL (found here: https://www.quotaguard.com/configuration/outbound).

    Once those steps are complete, you should have the bare bones setup done.

    Any issues, errors, or problems? Please write us at Support and we’ll help debug it with you to get you up and running.