设为首页 加入收藏

TOP

Greenplum+Hadoop学习笔记-13-客户端接口和程序(三)
2015-11-21 01:44:40 来源: 作者: 【 】 浏览:1
Tags:Greenplum Hadoop 学习 笔记 -13- 客户端 接口 程序
in3 for GPDB
5.2.1.1.说明

图形化管理和SQL执行、分析与监控工具,下载地址:http://www.pgadmin.org/download/windows.php

5.2.1.2.安装步骤概要
5.2.1.2.1.点击“运行”

\

5.2.1.2.2.显示欢迎界面

\

5.2.1.2.3.选择接收协议

\

5.2.1.2.4.选择安装目录

\\

5.2.1.2.5.点击“Install”

\\

5.2.1.2.6.点击“Finish”

\

5.2.1.2.7.运行后显示界面

\

修改gpadmin用户密码为’gpadmin’

template1=# alter role gpadmin with password 'gpadmin';

ALTER ROLE

\

如上图所示,勾选保存密码选项,但不需要恢复环境,因为每次都恢复环境会对服务器产生相应的压力。

登陆成功后的界面如下所示:


\

5.2.2.PSQL

5.2.2.1.说明

必须通过Master节点连接的行命令操作和管理工具

5.2.2.2.连接信息

[gpadmin@master ~]$ psql -h

psql: option requires an argument -- h

Try "psql --help" for more information.

[gpadmin@master ~]$ psql --help

This is psql 8.2.15, the PostgreSQL interactive terminal (Greenplum version).

Usage:

psql [OPTION]... [DBNAME [USERNAME]]

General options:

-c, --command=COMMAND run only single command (SQL or internal) and exit

-d, --dbname=DBNAME database name to connect to (default: "gpadmin") 连接的数据库名称,首次连接时默认是template1

-f, --file=FILENAME execute commands from file, then exit

-l, --list list available databases, then exit

-v, --set=, --variable=NAME=VALUE

set psql variable NAME to VALUE

-X, --no-psqlrc do not read startup file (~/.psqlrc)

-1 ("one"), --single-transaction

execute command file as a single transaction

--help show this help, then exit

--version output version information, then exit

Input and output options:

-a, --echo-all echo all input from script

-e, --echo-queries echo commands sent to server

-E, --echo-hidden display queries that internal commands generate

-L, --log-file=FILENAME send session log to file

-n, --no-readline disable enhanced command line editing (readline)

-o, --output=FILENAME send query results to file (or |pipe)

-q, --quiet run quietly (no messages, only query output)

-s, --single-step single-step mode (confirm each query)

-S, --single-line single-line mode (end of line terminates SQL command)

Output format options:

-A, --no-align unaligned table output mode

-F, --field-separator=STRING

set field separator (default: "|")

-H, --html HTML table output mode

-P, --pset=VAR[=ARG] set printing option VAR to ARG (see \pset command)

-R, --record-separator=STRING

set record separator (default: newline)

-t, --tuples-only print rows only

-T, --table-attr=TEXT set HTML table tag attributes (e.g., width, border)

-x, --expanded turn on expanded table output

Connection options:

-h, --host=HOSTNAME database server host or socket directory (default: "local socket") Master主机名

-p, --port=PORT database server port (default: "5432") Master端口,默认是5432

-U, --username=USERNAME database user name (default: "gpadmin") 登陆用户,默认是gpadmin,且gpadmin是超级用户

-w, --no-password never prompt for password

-W, --password force password prompt (should happen automatically)

For more information, type "\?" (for internal commands) or "\help" (for SQL

commands) from within psql, or consult the psql section in the PostgreSQL

documentation.

Report bugs to .

首页 上一页 1 2 3 下一页 尾页 3/3/3
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇数据库基本概念 下一篇锁的基本原理

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: