小编ilh*_*han的帖子

263
推荐指数
10
解决办法
27万
查看次数

不允许以“root”身份执行 PostgreSQL 服务器

我以 root 身份运行此代码:

/usr/local/bin/postgres -D /usr/local/pgsql/data
Run Code Online (Sandbox Code Playgroud)

因为它要我来运行它

然而它给出了这个错误;

"root" execution of the PostgreSQL server is not permitted.
The server must be started under an unprivileged user ID to prevent
possible system security compromise. See the documentation for
more information on how to properly start the server.
Run Code Online (Sandbox Code Playgroud)

如何登录 PostgreSQL?不是可以用root用户使用吗?

一些注意事项:这是 FreeBSD 10 上的 PostgreSQL 9.4(测试版,但 9.3 给了我同样的错误)。PostgreSQL 是通过 Ports 安装的。我想我有一个“pgsql”用户,因为它说

===> Registering installation for postgresql94-server-9.4.b3
===> Creating users and/or groups.
Using existing group 'pqsql'.
Using existing user 'pqsql'.
Run Code Online (Sandbox Code Playgroud)

postgresql

5
推荐指数
1
解决办法
2万
查看次数

标签 统计

innodb ×1

myisam ×1

mysql ×1

postgresql ×1