# install unixODBC and mysql-connector-odbc yum install unixODBC mysql-connector-odbc #view the basics of your config in a nice info file odbcinst -j #view the ODBC config instance file, this is for different database types.as you can see MySQL and PostgreSQL are allready configured 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 UsageCount=5 [MySQL] Description=ODBC for MySQL Driver=/usr/lib/libmyodbc5.so Setup=/usr/lib/libodbcmyS.so Driver64=/usr/lib64/libmyodbc5.so Setup64=/usr/lib64/libodbcmyS.so FileUsage=1 UsageCount=5 #from here we need to create specific instances/connections. vi /etc/odbc.ini #here’s a look at a sample ODBC connection config,remote database connect info [EAM] Description=MySQL connection to 'assetcloud' database Trace=OFF TraceFile=stderr Driver=MySQL SERVER=121.41.113.120 PORT=3306 DATABASE=assetcloud USERNAME=mysql PASSWORD=123456 #from here install the ODBC driver, and install SystemDSN odbcinst -i -d -f /etc/odbc.inst.ini odbcinst -i -s -l -f /etc/odbc.inst.ini #test the connection using the Database name {space} username isql EAM mysql #as we can see basic SQL Queries work SHOW DATABASES; select * from users; 使用odbcinst -q -d时,出现错误: odbcinst: SQLGetPrivateProfileString failed with . 办法:env |grep 'ODBC' 如无法找到环境变量ODBCSYSINI和ODBCINI,则: vi /etc/profile 增加如下内容: export ODBCSYSINI=/etc export ODBCINI=/etc/odbc.ini 另外,如果在linux下使用make,出现如下错误: configure: error: no acceptable C compiler found in $PATH 解决办法:yum -y install gcc gcc-c++ gdb
相关推荐
CentOS7配置本地yum源(超详细过程)
centos7安装配置mysql5.7教程全
CentOS7安装mysql5.7.19 & mysql5.7.19主从配置(CentOS7)
centos7配置局域网yum源--http方式.docx
CentOS 7配置yum源
centos7配置局域网yum源--http方式.pdf
centos 配置本地yum源库,很多版本都是为其他linux配置yum源库的教程,我使用的是centos,所以给出一些我自己配置的本地yum源库,基于centos
CentOS 7 安装 MySQL
本文档是MySQL官方文档,内容是如何在Centos7环境下用yum工具安装MySQL8。
centos7配置APache+PHP+mysql[归纳].pdf
centos 6.5配置mysql5.5
centos7 配置本地 yum 源
CentOS7操作系统在VM虚拟机下的安装,MySQL8.0.13在CentOS7下的主主互备,以及附带my.cnf的详细配置,带有注释。
CentOS7环境mysql小版本升级步骤,本文介绍的是替换二进制文件升级方式的升级步骤,步骤展示的是5.7.26升级至5.7.31的升级步骤,操作系统为centos7.4。
Yum简介 yum (全称为 Yellow dogUpdater,modified)是一个在Fedora和RedHat以及CentOS中的... //将官方源移动到/tmp/目录下 2.下载阿里yum源 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/r
CentOS7.x服务器MySQL5.7数据库Yum源安装包,可以支持直接yum安装更新MySQL
centos7搭建mysql集群,包含整个搭建步骤,部分错误解决方案
在本地虚拟机的场合,需要更换yum安装网络地址配置文件CentOS-Base.repo 从阿里云服务器下载一份CentOS-Base.repo文件存到本地
centos7.0安装mysql centos7.0安装mysql centos7.0安装mysql
linux(centos) 下C++连接mysql数据库 此程序只实现了查询功能,在centos下编译并运行通过