I am struggling to make this happen as easy as it should. Everywhere I look it says it is as simple as:
$ createuser -P
But that will always fail:
$ creation of new role failed: ERROR: role "postgres" already exists
I am expecting a prompt so that I can give a name, but it will not show up.
What now?
To add a user, click the Add (+) button at the top right corner. Provide information about the new pgAdmin role in the row: Use the drop-down list box next to Authentication source field to select the type of authentication that should be used for the user.
A user is a role with the ability to login (the role has the LOGIN attribute). Because all roles Cloud SQL creates have the LOGIN attribute, Cloud SQL uses the terms "role" and "user" interchangeably.
In Windows, go to: Start menu > All Programs > PostgreSQL 8.3 > psql to 'postgres'. This opens up the psql interactive terminal. Type the following statement, supplying the desired username and password: Code: CREATE ROLE username LOGIN PASSWORD 'password' NOINHERIT CREATEDB; Press the Enter key.
CREATE USER adds a new user to a PostgreSQL database cluster. Refer to Chapter 17 and Chapter 19 for information about managing users and authentication. You must be a database superuser to use this command. The name of the new user. The SYSID clause can be used to choose the PostgreSQL user ID of the new user.
Super user account in postgres is : postgres which is the database user and also OS user having all the access like :Superuser, Create role, Create DB, Replication, Bypass RLS etc. ROLES: PostgreSQL manages database access permissions using the concept of roles.
Your new read-only user now has the necessary permissions for Chartio to connect to your database. Use selective GRANT statements to limit PostgreSQL access to specific tables and columns for certain users. Create a new read-only user for your PostgreSQL database using pgAdmin so you can create your data source connection in Chartio.
Try reading the fine manuals. You supply a user-name
createuser -P newusername
Personally, I always do it via SQL with CREATE USER
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With