Create new user pgadmin 4
Here are the steps to create a new user in PGAdmin 4:
Step 1: Launch PGAdmin 4
Open PGAdmin 4 on your computer. You can do this by searching for "PGAdmin 4" in your start menu (Windows) or spotlight search (Mac).
Step 2: Connect to your PostgreSQL server
In the PGAdmin 4 window, click on "Object" > "Connect" to connect to your PostgreSQL server. Enter the following details:
- Hostname: The hostname or IP address of your PostgreSQL server.
- Port: The port number used by your PostgreSQL server (default is 5432).
- Username: The username to use for the connection (e.g. "postgres").
- Password: The password for the username (e.g. "password").
Click "Connect" to establish the connection.
Step 3: Create a new user
Once connected, click on "Object" > "Create" > "Database" > "User/Group Roles" to create a new user.
In the "Create User/Group Roles" window, enter the following details:
- Role name: Enter a name for the new user (e.g. "newuser").
- New user: Select "User" as the role type.
- Password: Enter a password for the new user.
- Confirm password: Re-enter the password to confirm.
Click "Save" to create the new user.
Step 4: Grant privileges to the new user
To grant privileges to the new user, click on "Object" > "Create" > "Database" > "Privileges" and select the new user from the list.
In the "Privileges" window, you can grant various privileges to the new user, such as:
- SELECT: Allow the user to select data from tables.
- INSERT: Allow the user to insert data into tables.
- UPDATE: Allow the user to update data in tables.
- DELETE: Allow the user to delete data from tables.
Click "Save" to grant the privileges.
Step 5: Verify the new user
To verify that the new user has been created and granted privileges, click on "Object" > "Browse" > "Users" and select the new user from the list.
You should see the new user listed with the privileges you granted. You can also try logging in to the PostgreSQL server using the new user credentials to verify that the user is functional.
That's it! You have successfully created a new user in PGAdmin 4.