title: why I am not able to makemigrations to postgres DB?
body: <p>My current Django project is bound to default SQLite DB. Now going forward I wanted to migrate to Postgres. I have followed this <a href="https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04" rel="nofollow noreferrer">link</a></p>
  <p>There's nothing wrong with the installation of the Postgres. I have followed exactly the same steps mentioned in the website:</p>
  <ol>
  <li><p>Login with the &quot;postgres&quot; user.</p>
  <pre><code>sudo -u postgres psql
  </code></pre>
  </li>
  <li><p>Create a Database.</p>
  <pre><code> CREATE DATABASE myproject;
  </code></pre>
  </li>
  <li><p>Create user and assign password.</p>
  <pre><code>CREATE USER myprojectuser WITH PASSWORD 'password';
  </code></pre>
  </li>
  <li><p>Grant privileges to the user.</p>
  <pre><code>GRANT ALL PRIVILEGES ON DATABASE myproject TO myprojectuser;
  </code></pre>
  </li>
  </ol>
  <p>After this I added the below properties to my Django's settings.py.</p>
  <pre><code>DATABASES = {
      'default': {
          'ENGINE': 'django.db.backends.postgresql_psycopg2',
          'NAME': 'DB_name',
          'USER': 'new_User_name',
          'PASSWORD': 'new_user_password',
          'HOST': '',
          'PORT': '',
      }
  }
  </code></pre>
  <p>Now, when I do <code>python manage.py makemigrations</code> I get <code>invalid password error</code>.</p>
  <p>Going forward, when I execute some postgres commands to check the environment. I have below observation.</p>
  <p>In the Postgres shell, I execute '\l' to see the databases. I see below.</p>
  <pre class="lang-none prettyprint-override"><code>          Name           |  Owner   | Encoding | Collate |  Ctype  |       Access privileges
  -------------------------+----------+----------+---------+---------+--------------------------------
   DB_Name                 | postgres | UTF8     | C.UTF-8 | C.UTF-8 | =Tc/postgres                  +
                           |          |          |         |         | postgres=CTc/postgres         +
                           |          |          |         |         | new_User_name=CTc/postgres
  </code></pre>
  <p>Then I execute '\du' to see the users status. I see below.</p>
  <pre class="lang-none prettyprint-override"><code>postgres=# \du
                                         List of roles
       Role name     |                         Attributes                         | Member of
  -------------------+------------------------------------------------------------+-----------
   postgres          | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
   new_User_name     |                                                            | {}
  </code></pre>
  <p>So, from the above output, I assume that the target database is still owned by default 'postgres' user, and for the new user, I do not see any roles attributes. Since, the target Database is still owned by default 'postgres' user. Therefore, even if I mention the DB name, new user and its password in the Django's settings.py file. It would not work. This is my understanding.</p>
  <p>So, please suggest how to proceed in this case.</p>