![]() * Restarting PostgreSQL 9.1 database server Handy PostgreSQL command line examples In order to make the above changes take effect you need to restart the service ~ » sudo service postgresql restart ![]() Listen_addresses = 'localhost' # what IP address(es) to listen on Restart the PostgreSQL cluster Uncomment the 'listen_addresses' section #. This is needed to stop any unwanted network traffic to your local development box sudo vim /etc/postgresql/9.1/main/nf # TYPE DATABASE USER ADDRESS METHOD Now restrict connections to allow only localhost First edit the main PostgreSQL access control file sudo vim /etc/postgresql/9.1/main/pg_hba.confĪdd in your development user with the method 'trust' # Database administrative login by Unix domain socket Luckily PostgreSQL lets us trust certain users when coming from certain domains. When in development, I often find myself dumping, restoring, dropping and re-creating databases all the time, so I find having to remember the password to be frustrating. Postgres=#\q Relax PostgreSQL access control Postgres=# alter user drupal with password 'password' Shall the new role be a superuser? (y/n) yĪnd change their passwords: postgres=# alter user postgres with password 'crazylongpassword' Start by switching to the postgres superuser: ~ » sudo su - postgresįrom here you can create new users: createuser drupal Sudo apt-get install postgresql phppgadmin Create the users and set permissions These settings should be tweaked moving to staging or production, they are mainly done to help the developers. I am constantly referring to several shell scripts to help with PostgreSQL, so this blog post is merely a brain dump on how I find it easiest to install and configure for local Drupal development.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |