$ psql
報錯如下:
psql: FATAL: role “appleyuchi” does not exist
使用:
sudo -s -u postgres
就會把當前用戶切換成postgres
postgres=# ALTER USER postgres WITH PASSWORD 'postgres';
上面這句話的意思是,
給postgres這個賬戶的密碼設置爲postgres
$ psql
報錯如下:
psql: FATAL: role “appleyuchi” does not exist
使用:
sudo -s -u postgres
就會把當前用戶切換成postgres
postgres=# ALTER USER postgres WITH PASSWORD 'postgres';
上面這句話的意思是,
給postgres這個賬戶的密碼設置爲postgres