Warning this part need to be validate !! If i remember well there is a better debian way. More info on the syntax can be found here : Now you can easily connect with $ psql -d mypgdatabase -h localhost -U mypguser $ psql -d mypgdatabase -h localhost -U mypguserĪdd line for auth : $ echo 'hostname:port:mypgdatabase:mypguser:mypgpassword' > ~/.pgpass Or, if the OS user name is not the same as the database user name: $ createuser -pwprompt mypguser #from regular shellĬonnect as user mypguser to new database # su - mypguser If your system uses sudo to get administrative rights: $ sudo -u postgres psqlĬreate a regular system user account using adduser (skip this step to use an existing account): # adduser mypguser #from regular shellĬonnect to database and create a new database user and a database: # su - postgres Search Debian packages to find the list of possibilities:īoth the default database user and default database are called postgres. Please note that the procedural languages are installed separately (plpgsql comes by default). Phppgadmin - PostgreSQL web-based administration tool. ![]() Postgresql-doc - PostgreSQL documentation. # apt install postgresql postgresql-client Required packages: postgresql postgresql-client
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |