essay | tech | year-summary | about

返回上级菜单

postgresql note


日期:2020-03-24T00:00:00Z

postgresql备忘录(debian)

过两天再加注释

$ apt install postgresql postgresql-client
$ sudo pg_ctlcluster 12 main start
$ sudo -u postgres bash
$ psql # or psql postgres
$ adduser mypguser #optional, you can use your existing user
$ sudo -u postgres bash
$ createuser --pwprompt mypguser $ you will input your password here
$ createdb -O mypguser mypgdatabase $optional, you can use existing db, like postgres as default
$ psql mypgdatabase
pg_lsclusters