Linux 通过ODBC连接HGDB

?
文档用途

?使用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 PostgreSQL
Driver????? = /usr/lib/psqlodbcw.so
Setup?????? = /usr/lib/libodbcpsqlS.so
Driver64??? = /usr/lib64/psqlodbcw.so
Setup64???? = /usr/lib64/libodbcpsqlS.so
FileUsage?? = 1

2)配置odbc

# vim /etc/odbc.ini
[HGDB]
Description = Test to HGDB
Driver = PostgreSQL
Database = highgo
Servername = 192.168.80.126
UserName = highgo
Password = password
Port = 5866
ReadOnly = 0
ConnSettings = set client_encoding to UTF8

3)验证odbc

#?isql访问
[root@localhost ~]isql?HGDB?highgo password

+---------------------------------------+
| Connected!??????????????????????????? |
|?????????????????????????????????????? |
| sql-statement???????????????????????? |
| help [tablename]????????????????????? |
| quit????????????????????????????????? |
|?????????????????????????????????????? |
+---------------------------------------+
SQL>

更多详细信息请登录【瀚高技术支持平台】查看https://support.highgo.com/#/index/docContent/95ef7c98012e8cf9

Linux 通过ODBC连接HGDB

上一篇:使用pdb进行Python调试


下一篇:compiled python files