我在Windows服务中有这个:
C:/Program Files/PostgreSQL/8.4/bin/pg_ctl.exe runservice -N "postgresql-8.4" -D "D:/PostgreSQL/8.4/data" -w
Run Code Online (Sandbox Code Playgroud)
它永远不会完成执行.但是,如果我在dos shell上执行此操作:
C:/Program Files/PostgreSQL/8.4/bin/pg_ctl.exe start -N "postgresql-8.4" -D "D:/PostgreSQL/8.4/data" -w
Run Code Online (Sandbox Code Playgroud)
请注意,我只将"runservice"更改为"start",它运行正常.
任何的想法?
如何在没有安装的情况下在Windows中启动PostgreSQL和pgAdmin III.我在系统中没有管理员权限.所以我需要在不安装的情况下启动应用程序.我怎样才能做到这一点?
有时我的命令psql似乎没有效果.知道为什么吗?
以下是数据库中所有表的列表library_development:
library_development=> \d
List of relations
Schema | Name | Type | Owner
--------+-------------------+-------+----------
public | Pavan | table | postgres
public | schema_migrations | table | sai
(2 rows)
Run Code Online (Sandbox Code Playgroud)
在此之后我删除的表Pavan使用:
library_development-> drop table Pavan
Run Code Online (Sandbox Code Playgroud)
但是表格没有被删除,其显示如下:
library_development=> \d
List of relations
Schema | Name | Type | Owner
--------+-------------------+-------+----------
public | Pavan | table | postgres
public | schema_migrations | table | sai
(2 rows)
Run Code Online (Sandbox Code Playgroud)
也:
我在Windows中使用PostgreSQL.是否有任何清除控制台的命令(如Oracle中的cl scr)?
在使用DML脚本时,我是否需要在Postgresql中执行"提交"的概念?
我收到错误
FATAL: could not create lock file "postmaster.pid": Permission denied
Run Code Online (Sandbox Code Playgroud)
当试图执行命令
pg_ctl restart --pgdata "D:\Program Files\PostgreSQL\8.3\data"
Run Code Online (Sandbox Code Playgroud)
postgres用户对D:\,D:\ Program Files \,D:\ Program Files\PostgreSQL \和D:\ Program Files\PostgreSQL\8.3\data的完全权限已设置.我还需要做什么?
我有一个Windows PostgreSQL安装.
根据一些帖子,没有为'postgres'用户设置默认密码,但我无法使用空密码字符串进行连接.
我尝试连接时收到此异常:
Caused by: org.postgresql.util.PSQLException: FATAL: password authentication failed for user "postgres"
Run Code Online (Sandbox Code Playgroud)
最相关的提示是:https: //stackoverflow.com/a/25943227/1005607
Open pg_hba.conf
Change md5 -> TRUST
then restart PgAdmin.
Run Code Online (Sandbox Code Playgroud)
我尝试了并重新启动了PGAdmin但是当我尝试连接时它仍然要求我输入密码:
Windows中的任务管理器显示一些PostgreSQL进程正在运行.我不能把它们关掉.
我试过这个但它失败了:
pg_ctl restart
ERROR:
pg_ctl: no database directory specified and environment variable PGDATA unset
psql.exe postgres
Password: (none)
ERROR:
psql: fe_sendauth: no password supplied
Run Code Online (Sandbox Code Playgroud)
如何重置用户'postgres'的默认密码?
我正在使用 Rails 开发网站,但是当我尝试打开我的本地主机时出现此错误
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?
Run Code Online (Sandbox Code Playgroud)
各位大佬怎么解决