KADB版本:Greenplum Database 6.0.0 build dev.V003R002C001B0181.d354cc9215
KES版本:KingbaseES V008R006C007B0012
KES修改参数,在kingbase.conf文件中,设置
password_encryption = md5
登录配置文件sys_hba.conf修改登录验证方式为md5
创建用户
test=# show password_encryption;
?password_encryption
---------------------
?md5
(1 row)
test=# create user u2 with password '12345';
CREATE ROLE
CREATE EXTENSION dblink;
test=# SELECT dblink_connect('kingbase','host=192.168.85.133 port=54321 dbname=test user=u2 password=12345');
?dblink_connect
----------------
?OK
(1 row)
test=# SELECT * FROM dblink('kingbase', 'SELECT * FROM u2') AS dbltab(a int,b varchar(20));
?a |???? b????
---+-----------
?1 | ccccccccc
?2 | dddddd
?2 | dddddd
?2 | dddddd
(4 rows)
test=# SELECT dblink_exec('kingbase', 'insert into u2 values(''3'',''this is test'')',false);
?dblink_exec
-------------
?INSERT 0 1
(1 row)