Home  >  Q&A  >  body text

Deploy Django using mysql database on a personal server

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粉283559033P粉283559033182 days ago378

reply all(1)I'll reply

  • P粉764785924

    P粉7647859242024-04-01 13:04:22

    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

    reply
    0
  • Cancelreply