对于我的Django项目,我使用'postgresql_psycopg2',我的数据库驻留在网络上的一个公共服务器上。我如何在MySQL中使用IP地址作为'主机'来连接到那个数据库?我曾尝试,但始终显示以下错误:Python-PostgreSQL:如何通过网络IP连接数据库
OperationalError at /
could not connect to server: Connection refused
Is the server running on host "" and accepting TCP/IP connections on port 5432?
你可以通过终端中的psql命令连接到你的数据库,你的settings.py中有参数吗? –