![]() ![]()
If, instead, you prefer to use sudo for each command without switching from your normal account, type: If you are logged in as the postgres account, you can create a new user by typing: The -interactive flag will prompt you for the name of the new role and also ask whether it should have superuser permissions. You can create new roles from the command line with the createrole command. ![]() Step 3 - Creating a New RoleĬurrently, you just have the postgres role configured within the database. Many use cases require more than one Postgres role. This will log you directly into Postgres without the intermediary bash shell in between.Īgain, you can exit the interactive Postgres session by typing: You could alternatively do this in one step by running the single command psql as the postgres user with sudo, like this: In the last example, you were instructed to get to the Postgres prompt by first switching to the postgres user and then running psql to open the Postgres prompt. Accessing a Postgres Prompt Without Switching Accounts This will bring you back to the postgres Linux command prompt. #POSTGRES APP FOR LINUX FREE#This will log you into the PostgreSQL prompt, and from here you are free to interact with the database management system right away.Įxit out of the PostgreSQL prompt by typing: You can now access a Postgres prompt immediately by typing: Switch over to the postgres account on your server by typing: There are a few ways to use this account to access Postgres. In order to use Postgres, you can log into that account. The installation procedure created a user account called postgres that is associated with the default Postgres role. If a role exists within Postgres, a Unix/Linux username with the same name is able to sign in as that role. Upon installation, Postgres is set up to use ident authentication, meaning that it associates Postgres roles with a matching Unix/Linux system account. These are, in some ways, similar to regular Unix-style accounts, but Postgres does not distinguish between users and groups and instead prefers the more flexible term “role”. Step 2 - Using PostgreSQL Roles and Databasesīy default, Postgres uses a concept known as roles to handle authentication and authorization. #POSTGRES APP FOR LINUX SOFTWARE#Now that the software is installed and running, we can go over how it works and how it may be different from similar database management systems you may have used. #POSTGRES APP FOR LINUX INSTALL#
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |