小编hoo*_*oke的帖子

如何使用shell脚本连接到postgresql数据库

我想编写一个shell脚本来运行这些命令.我通常使用如下命令从终端连接

    //first go to the directory 
     cd /opt/novell/sentinel/3rdparty/postgresql/bin/
    // then type following
     export LD_LIBRARY_PATH=/opt/novell/sentinel/3rdparty/postgresql/lib/
    // then fire following command 
     ./psql --host 127.0.0.1 --port 5432 --dbname=SIEM --username=dbauser
     Password for user dbauser: ****
Run Code Online (Sandbox Code Playgroud)

shell psql

4
推荐指数
1
解决办法
2万
查看次数

标签 统计

psql ×1

shell ×1