psql连接数据库
程序员文章站
2024-03-21 11:56:58
...
psql连接数据库
指定用户连接数据库
psql -d '数据库名',-U '用户名'
psql -d lawa -U odoo
查看当前连接情况
lawa=# \c
You are now connected to database "lawa" as user "odoo".
lawa=#
已经进入到psql的情况
\c '数据库' '用户名'
lawa=# \c lawa lawa
You are now connected to database "lawa" as user "lawa".
lawa=# \c
You are now connected to database "lawa" as user "lawa".
lawa=#
上一篇: 7-2 邪门歪道、推荐书籍、结束语
下一篇: Java静态绑定和动态绑定的理解