English 中文(简体)
• 如何在Mac osx上设置邮政管理处用户?
原标题:How to setup postgres admin user on mac os x?

我刚刚在我的Mac(lion)上安装了电梯,当时我使用<条码>psql 姿态gres(或任何其他数据库),自动对我进行标识。

不管怎样,即便是用<密码<<>/代码>在psql上改动过错。 听起来,这只是让我不给我一个密码。

该网站还显示我的用户名称(与我的mac oslogin号相同的用户名称)为所有人。

是否有办法确保更多的东西?

最佳回答

Postgresql is most likely configured to trust anyone. This is configured int the file pg_hba.conf which is located in the data directory of postgresql. I do not know where homebrew places the data dir. However if you issue the following command in a terminal:

ps aux | grep postmaster

您将做出如下回应:

postgres          63   0,0  0,1  2472288   4888   ??  Ss   12:19pm   0:00.85 /Library/PostgreSQL/9.0/bin/postmaster -D/Library/PostgreSQL/9.0/data

之后的部分是数据目录的位置。 你们也许必须重新定位,使之适合。

开放Pg_hba。

sudo vi <datadir>/pg_hba.conf

档案载有(关于我所看到的所有设施)描述环境的公平评论范围。 实际环境是档案的底线。 我怀疑其中一条或多条线是信任的。 将这些改动改为5级,以核实密码。

问题回答

暂无回答




相关问题
摘录数据

我如何将Excel板的数据输入我的Django应用? I m将PosgreSQL数据库作为数据库。

Postgres dump of only parts of tables for a dev snapshot

On production our database is a few hundred gigabytes in size. For development and testing, we need to create snapshots of this database that are functionally equivalent, but which are only 10 or 20 ...

How to join attributes in sql select statement?

I want to join few attributes in select statement as one for example select id, (name + + surname + + age) as info from users this doesn t work, how to do it? I m using postgreSQL.

What text encoding to use?

I need to setup my PostgreSQL DB s text encoding to handle non-American English characters that you d find showing up in languages such as German, Spanish, and French. What character encoding should ...

SQL LIKE condition to check for integer?

I am using a set of SQL LIKE conditions to go through the alphabet and list all items beginning with the appropriate letter, e.g. to get all books where the title starts with the letter "A": SELECT * ...

热门标签