简体   繁体   中英

Django depoyment with mysql database on personal server

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!!

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM