5π
I think Itβs not possible to connect directly to your mysqlserver instance from remote, for security reason, the port 3306 is blocked.
They suggest to connect through SSH Tunnel, follow this link.
I donβt know If you can do an ssh tunnelling within Django, You should probably write a custom configuration. Itβs simpler to install an SSH Tunnel software on your PC and then connect your Django App to localhost on a port You have to choose.
Bye
3π
As per PythonAnyWhere documentation :
-
Open a terminal and run below command.
ssh -L 3333:username.mysql.pythonanywhere-services.com:3306 username@ssh.pythonanywhere.com
provide your PAW account login password
replace username with your username.
-
Open another terminal and run below command.
mysql -h 127.0.0.1 βport 3333 -u username -p
provide your mysql password. Available in settings file.
keep terminal 1 open as long as you are working on terminal 2.
- [Django]-Creating custom list filter in django
- [Django]-How to store HDF5 (HDF Store) in a Django model field
- [Django]-How to import django models in scrapy pipelines.py file
- [Django]-Caught TypeError while rendering: 'BoundField' object is not iterable
- [Django]-Implement zeromq publisher in django with celery (Broker redis)
0π
Only Paid account have permission to access remoteserver for mysql database
- [Django]-Running Gunicorn behind chrooted nginx inside virtualenv
- [Django]-When and how to validate data with Django REST Framework