windows - 在 Windows 上设置 Postgresql 10:无法在端口 5432 上启动服务器
问题描述
在 Windows 上为前端 Web 开发设置 Postgres
这不是我的专业领域(前端人员),但我需要简单地在我身边运行的 postgres 来连接我正在从事的项目的测试数据库:
在我开始我的项目之前,我必须运行它:dropdb [db_name] && createdb [db_name] && npm run migration:run:dev
当我这样做时,我得到了典型的:
dropdb: could not connect to database template1: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
这告诉我 postgres 没有在端口 5432 上运行,我在 Resource Monitor 和 pgAdmin 内部进行了验证...那),我得到:
could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?
我已经通过打包的安装程序安装了postgres,并且尝试了各种解决方案,例如: https://tableplus.io/blog/2018/10/how-to-start-stop-restart-postgresql-server.html 可以'不在端口 5432 上连接到 Postgresql(我不需要远程连接)
笔记)
我使用自制软件在我的 Mac 上使用 2 个命令执行此操作……但服务不适用于 linuxbrew。如果我的 mac 在同一个网络上没有问题,我认为我的网络不是问题。
我认为端口 5432 上可能正在运行某些东西,但资源监视器中似乎没有任何内容。
解决方案
推荐阅读
- css - CSS - 根据同一 Div 内的图像颜色更改 Div 背景颜色
- javascript - E11000 重复键错误收集:在 mongodb 中插入文档
- postgresql - 有没有办法监控 PostgreSQL 中的所有 ddl 脚本?
- javascript - 动态将脚本注入文档时无法实例化类
- unity3d - 为什么我的对象的方向统一改变?
- javascript - 使用 javascript 操作 :before 和 :after
- maven - TestNG 结果未显示在 Selenium 的 Maven 项目中
- nginx - 在 Raspbian 的端口 80 上使用 Nginx 设置 Vue 应用程序运行,以及在端口 8080 上运行的 Flask 后端
- java - 休眠 utf8mb4 字符集
- sql - 如何在 MS SQL 服务器中为每个组拆分 10% 的数据集为“控制”,90% 为“测试”