有时候需要在容器内部执行SQL语句,具体操作如下:
进容器后:
psql: error: could not connect to server: FATAL: role "root" does not exist
root@xxxx:/usr/lib/postgresql/12/bin# ./psql -U postgres -h 127.0.0.1 数据库名
有时候需要在容器内部执行SQL语句,具体操作如下:
进容器后:
psql: error: could not connect to server: FATAL: role "root" does not exist
root@xxxx:/usr/lib/postgresql/12/bin# ./psql -U postgres -h 127.0.0.1 数据库名