Python flask app cannot connect to mLab

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.

I could manage to run the app on Cpanel:

but it couldn’t connect to database: [Errno 111] Connection refused, Timeout: 30s, Topology Description: <TopologyDescription id: 5f…, topology_type: Single, servers: [<ServerDescription (‘’, xxxxx) server_type: Unknown, rtt: None, error=AutoReconnect(‘ [Errno 111] Connection refused’,)>]>

I should say that I don’t have enough knowledge and experience with Cpanel, but I’m trying to deploy my website there. I really hope someone here can help me with this regard :slightly_smiling_face: