I’ve got a domain from Godaddy and at the same time I’ve also got its Cpanel web hosting.
I have a flask app, and I’m using mLab as a database, and here’s how I connect to the database in code:
I could manage to create a new python application on Cpanel:
when I check my domain, let say mydomain.com, my website is there, but the app couldn’t connect to the database.I checked logs, I’ve got this error:
dsxxxxxx.mlab.com:xxxxx: [Errno 111] Connection refused, Timeout: 30s, Topology Description: <TopologyDescription id: 5f..., topology_type: Single, servers: [<ServerDescription ('dsxxxxxx.mlab.com', xxxxx) server_type: Unknown, rtt: None, error=AutoReconnect('dsxxxxxx.mlab.com:xxxxx: [Errno 111] Connection refused',)>]>
and one more question, is it possible to have and use MongoDB in Cpanel?
I need to say that I don’t have enough knowledge of Cpanel, but I’m trying to deploy my website there. I really hope someone here can help me with this regard