[英]How to open postgres command Line?
I have postgres installed.How to open postgres command Line? 我安装了postgres。如何打开postgres命令行? When i open command prompt, i have
当我打开命令提示符时,我有
Microsoft Windows [Version 10.0.17134.590]
(c) 2018 Microsoft Corporation. All rights reserved.
C:\Users\dhanr>
How to navigate to postgres command Line, as my final goal is to run pg_dump dbname > outfile
command. 如何导航到postgres命令行,因为我的最终目标是运行
pg_dump dbname > outfile
命令。
You should use psql command-line tool. 您应该使用psql命令行工具。
You can find psql at your installation directory. 您可以在安装目录中找到psql。 Example;
例;
C:\Program Files\PostgreSQL\10\bin\psql.exe
Go inside bin folder in C drive where Postgres is installed. 进入安装了Postgres的C盘中的bin文件夹。 run following command in git bash or Command prompt: pg_ctl.exe restart -D "" Ex: pg_ctl.exe restart -D "C:\\Program Files\\PostgreSQL\\9.6\\data"
在git bash或命令提示符下运行以下命令:pg_ctl.exe restart -D“”Ex:pg_ctl.exe restart -D“C:\\ Program Files \\ PostgreSQL \\ 9.6 \\ data”
Another way: type "services.msc" in run popup(windows + R). 另一种方法:在运行弹出窗口中键入“services.msc”(windows + R)。 This will show all services running Select Postgres service from list and click on start/stop/restart.
这将显示从列表中运行Select Postgres服务的所有服务,然后单击开始/停止/重新启动。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.