本文介绍了PostgreSQL无法通过PGAdmin4连接应用程序服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows机器上安装了PostgreSql.我可以通过cmd连接到PostgreSql.但是,当我要启动pgAdmin时,却收到此错误消息.

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.

我的机器上也安装了Mysql,如果它会使任何复杂的事情发生.

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

推荐答案

今天我遇到了同样的问题:

The same problem happened to me today:

这就是我的解决方法:

1)使用文本编辑器打开 c:\ Program Files \ pgAdmin 4 \ v1 \ web 下的 config_distro.py 文件. >文件夹.将 SERVER_MODE 的值从 True 更改为 False ,然后保存更改. (我已经以管理员身份运行Notepad ++,以便能够保存在此受保护的文件夹中.)

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.)

2)转到文件夹 c:\ Users \ your_name \ AppData \ Roaming \ pgAdmin ,并确保其中没有任何内容(删除所有文件,因为它们是临时,将在启动 pgAdmin )

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)

3)开始 pgAdmin

4)这次,您会看到一个白色的盒子,至少在我运行缓慢的笔记本电脑上,这个盒子大约需要20秒. (您可能会短暂看到原始错误消息,但不用担心).

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).

5)同时,将创建运行该应用程序所需的临时文件.

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

6):临时文件处理结束后,应用程序将按预期方式启动.

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

这篇关于PostgreSQL无法通过PGAdmin4连接应用程序服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 10:43