# Set up PostgreSQL database ## On MacOSX ### Install Postgres On MacOSX we can use the [Postgress App](http://postgresapp.com/). Just download and move the app into your Applications folder. Follow the instructions, its the easiest way I have seen to set up PostgresSQL! ### Create an optimized user for our Django projects Login to the database from the terminal using: ``` psql ``` ```sql CREATE USER django WITH PASSWORD '[password]'; ALTER ROLE django SET client_encoding TO 'utf8'; ALTER ROLE django SET default_transaction_isolation TO 'read committed'; ALTER ROLE django SET timezone TO 'UTC'; ALTER USER django CREATEDB; ``` ### Create a database for this specific Django project Login to the database from the terminal using: ``` psql ``` ```sql CREATE DATABASE [project-name]; GRANT ALL PRIVILEGES ON DATABASE [project-name] TO django; ```