Linux 通过ODBC连接HGDB一、ODBC安装1、UnixODBC安装# yum安装 [root@localhost ~]yum install -y unixODBC.x86_64# 验证安装 [root@localhost ~]# rpm -qa | grep unixODBC unixODBC-2.3.1-14.el7.x86_64 2、PostgresqlODBC安装# yum安装 [root@localhost ~]yum install -y postgresql-odbc.x86_64# 验证安装 [root@localhost ~]rpm -qa | grep postgresql-odbc postgresql-odbc-09.03.0100-2.el7.x86_64 二、ODBC配置1、查看odbcinst# cat /etc/odbcinst.ini[PostgreSQL]Description = ODBC for PostgreSQLDriver = /usr/lib/psqlodbcw.soSetup = /usr/lib/libodbcpsqlS.soDriver64 = /usr/lib64/psqlodbcw.soSetup64 = /usr/lib64/libodbcpsqlS.soFileUsage = 1 2、配置odbc# vim /etc/odbc.ini[HGDB]Description = Test to HGDBDriver = PostgreSQLDatabase = highgoServername = 192.168.80.126UserName = highgoPassword = passwordPort = 5866ReadOnly = 0ConnSettings = set client_encoding to UTF8 3、验证odbc# isql访问[root@localhost ~]isql HGDB highgo password+---------------------------------------+| Connected! || || sql-statement || help [tablename] || quit || |+---------------------------------------+SQL>