PSQL无法连接到服务器,我正在使用Windows

时间:2020-04-12 13:44:06

标签: postgresql psql

我在Windows Powershell中执行了以下操作,因为我无法使用psql。每当我尝试运行psql时,它将显示此信息。 我已经尝试过这些解决方案,但是它们都不起作用:

psql: error: could not connect to server: 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?
(base) PS C:\Users\User> postgres -D C:\Users\User\scoop\persist\postgresql\data
2020-04-12 21:30:39.427 +08 [14152] LOG:  starting PostgreSQL 12.2, compiled by Visual C++ build 1914, 64-bit
2020-04-12 21:30:39.444 +08 [14152] LOG:  listening on IPv6 address "::1", port 5432
2020-04-12 21:30:39.444 +08 [14152] LOG:  listening on IPv4 address "127.0.0.1", port 5432
2020-04-12 21:30:39.732 +08 [1100] LOG:  database system was interrupted; last known up at 2020-04-12 17:27:20 +08
2020-04-12 21:30:43.678 +08 [1100] LOG:  invalid record length at 0/1750D18: wanted 24, got 0
2020-04-12 21:30:43.679 +08 [1100] LOG:  invalid primary checkpoint record
2020-04-12 21:30:43.679 +08 [1100] PANIC:  could not locate a valid checkpoint record
2020-04-12 21:30:44.603 +08 [14152] LOG:  startup process (PID 1100) was terminated by exception 0xC0000409
2020-04-12 21:30:44.603 +08 [14152] HINT:  See C include file "ntstatus.h" for a description of the hexadecimal value.
2020-04-12 21:30:44.604 +08 [14152] LOG:  aborting startup due to startup process failure
2020-04-12 21:30:44.610 +08 [14152] LOG:  database system is shut down

0 个答案:

没有答案