Deploy Django using mysql database on a personal server
P粉283559033
P粉283559033 2024-03-31 14:44:26
0
1
538

I'm working on deploying my Django project on Linode. The MySQL database I use during development is hosted on my home ubuntu server. This is different from the computer I program on. In the settings.py file I set up the database connection and it works fine. On my personal server at home, I updated UFW to allow the new linode IP address and granted permissions to that IP address. When I run the server on a project deployed on linode, I get an error (2003, "Unable to connect to the MySQL server on 'Personal Server IP Address: 3306' (110)" ).

How do I enable the linode server to communicate with my personal server's MySQL database?

P粉283559033
P粉283559033

reply all(1)
P粉764785924

Iiuc, you are trying to connect to your home server from a linode - this is a strange configuration and will cause problems

What you need to do is allow incoming connections at the router level so that packets are not dropped via port forwarding - I think your router is blocking incoming database connections

But as Yevhen said - introducing MySql directly into Linode is a better way

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template