portpalace.blogg.se

Postgres sql command line for mac
Postgres sql command line for mac












postgres sql command line for mac
  1. Postgres sql command line for mac how to#
  2. Postgres sql command line for mac mac os x#
  3. Postgres sql command line for mac install#
  4. Postgres sql command line for mac upgrade#
  5. Postgres sql command line for mac password#

If you allow a user to manage their password, they are unknowingly revealing a password to an administrator or low-level employee tasked with reviewing logs.If you collect these logs/ ETL them and display them where others have access, they could end up seeing this password, etc.If you are not protecting these logs, it’s a problem.If you have your logging configuration set to log DDL statements log_statement = ddl or higher, then your plain text password will show up in your error logs.

postgres sql command line for mac

  • If you do not have SSL and are modifying remotely you are transmitting the plain text password across the network.
  • Here are a few scenarios of unintended consequences of altering a users password in plain text. What I could NOT find was the config file that sets the default values for the psql CLI command.This is similar to other answers in syntax, but it should be known that you can also pass the MD5 hash value of the password, so you are not transmitting a plain text password. (Just don't forget to /etc/init.d/postgresql restart ) I think it is certainly worth checking out before you muck about with file permissions and ownerships.

    postgres sql command line for mac

    Of course, you can simply remove your last set of config changes from the *.conf files, too, to test if those are the source of your problem. There are a number of useful options like this for the psql command that you can find here: so that you can test out your OWN particular misconfiguration. To test if you have done something similar, you can run When I changed it back to 5432, it worked as expected. I had changed the port from port = 5432 to port = 5433. I had mis-configured the listening port in the config file: /etc/postgresql/9.4/main/nf. It turned out that my solution was far simpler. I got this same error from trying to run psql on the command line.

    Postgres sql command line for mac install#

    Sidenote: if you are using activerecord-postgresql-adapter gem, uninstall it first, then re-install pg, then install activerecord-postgresql-adapter again. After a quick pg_ctl to restart the server, both new and old projects worked. Very frustrating.until I re-installed pg gem in an pre-10.8 project ( gem uninstall pg & gem install pg) and left unix_socket_directory commented out in conf file. But if I changed conf and hard-coded var/pgsql_socket, any new projects would complain that the socket in /tmp was missing.

    Postgres sql command line for mac upgrade#

    If I left unix_socket_directory blank/commented out in nf, any projects existing prior to the upgrade would complain that the socket in /var/pgsql_socket was missing.

    postgres sql command line for mac

    I also had the mysterious /var/pgsql_socket_alt folder post-upgrade, but I just removed it and created /var/pgsql_socket as suggested by However, that wasn't the final solution. That was for Lion, but I was having same issues as the one in this thread after upgrading from 10.6.8 to Mountain Lion and having installed PostgreSQL via HomeBrew prior while on 10.6.8. There appears to be no /var/pgsql_socket/ directory, let alone the /var/pgsql_socket/.s.PGSQL.5432 socket file mentioned above!?! Maybe the install of Mountain Lion wiped that out? $ ls -l /var/ | grep pgĭrwxr-x- 2 _postgres _postgres 68 Jun 20 16:39 pgsql_socket_alt Rendered users/ within layouts/application (1.3ms) Meltemi 466 0.0 0.0 2443096 3728 ? S Wed12PM 0:00.85 /usr/local/bin/postgres -D /usr/local/varpostgres -r /usr/local/var/postgres/server.logĪnd it's responding to queries (both to a test db and the development db) from a local Rails app User Load (0.2ms) SELECT "users".* FROM "users" Is the server running locally and acceptingĬonnections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?īut Postgres is still clearly running: $ ps aux | grep postgres Psql: could not connect to server: No such file or directory I am unable to connect (but was able to before pre-Mountain Lion): $ psql -U rails -d myapp_development

    Postgres sql command line for mac how to#

    I'm not a DBA, but hoping someone can tell me how to troubleshoot this. It was installed originally via Homebrew.

    Postgres sql command line for mac mac os x#

    Recently updated my machine from Mac OS X Lion (10.7.4) to Mountain Lion (10.8) and I think it borked my PostgreSQL installation.














    Postgres sql command line for mac