Skip to content

Technical problem

Hi Muhammad Shayan,

Kindly understand here that you are running the python notebook on your local machine and trying to connect to PostgreSQL or MySQL server on cloud based theia environment. When you use host as "localhost", it means that both the python notebook and the database server are on the same local machine, which is not the case here. That is why you are getting error with the host. 

Here, instead of localhost, you need the address of the machine where the PostgreSQL or MySQL server are hosted. But that is not known to us. Hence, you can opt for two options:
1. Run the python notebook also on the cloud environment.
2. Download and install database servers on your local machine, so that both the notebook and the database server are on the same machine and the host can "localhost" in such a case.

Regards,
Staff

Feedback and Knowledge Base