Home > database >  Django depoyment with mysql database on personal server
Django depoyment with mysql database on personal server

Time:08-03

I am working on deploying my Django project on Linode. My MySQL database that I used during development was on a ubuntu server that I have at my house. This was different that the computer that I wrote the program on. In the settings.py file, I had the database connections set up and working. On my personal server at home, I have updated the UFW to allow the new linode ip address and granted privileges to the ip address also. When I go to run the server on deployed project on linode, I get an error (2003, "Can't connect to MySQL server on 'personal server ip address':3306' (110)").

How do I get the linode server to be able to talk to my personal server's MySQL database?

Thank you!!

CodePudding user response:

Iiuc, you are trying to connect from linode to your home server - this is an odd configuration and will be problematic

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

But like Yevhen said - it is a better approach to have MySql in Linode directly

  • Related