postgre管理员 无法访问表,Postgresql无法通过PGAdmin4连接应用程序服务器

本文详细描述了在Windows上安装PostgreSQL后遇到pgAdmin连接问题的解决方案,包括修改config_distro.py文件、清理临时文件和更改SERVER_MODE。步骤涉及文本编辑器权限、临时文件创建过程和pgAdmin启动延迟。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

I installed PostgreSql on my Windows machine.

I can connect to PostgreSql through cmd.

But when I want to launch pgAdmin I am getting this error message.

Failed to connect to the pgAdmin application server. Click here to try again.

I have also Mysql installed on my machine if it can make any complications.

解决方案

The same problem happened to me today:

D7UdX.png

And this is how I've solved it:

1) Use a text editor to open the config_distro.py file under the c:\Program Files\pgAdmin 4\v1\web folder. Change the value for SERVER_MODE from True to False, then save the change. (I have run Notepad++ as an Administrator, in order to be able to save in this protected folder.)

Azgjp.png

2) Go to folder c:\Users\your_name\AppData\Roaming\pgAdmin and make sure there is nothing there (delete all the files, as they are temporary and will be restored after starting pgAdmin)

bWbDV.png

3) Start pgAdmin

9NFcb.png

4) This time you will see a white box that sits - at least, on my slow laptop - about 20 seconds. (You may briefly see the original error message, but do not worry).

pg0pl.png

5) Meanwhile, the temporary files - required for running the application - are created.

j9gZy.png

6) Once the temporary files process is over, the application starts as expected.

JLp68.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值