
07_linux
日常收集
顾家九珩
这个作者很懒,什么都没留下…
展开
-
linux_C通过代码访问mysql
#include <stdio.h>#include <mysql.h>int main(int argc,char *argv[]){ MYSQL conn; int res; mysql_init(&conn); //"root":数据库管理员 "":root密码 "db_jesse":数据库的名字 if(mysql_real_connect(&conn, "localhost", "root", "", "db.原创 2020-06-27 22:20:01 · 164 阅读 · 0 评论 -
linuxC++_OCCI访问oracle
下列代码测试了通过linux occi方式连接数据库。#include <iostream>#include <occi.h>using namespace std;#define LINUXOCCI //避免函数重定义错误using namespace oracle::occi;int main(){ Environment *env=Environment::createEnvironment(Environment::DEFAULT); c原创 2020-06-27 22:13:41 · 177 阅读 · 0 评论 -
rhel8_oracle12c_occi_ORA-24960错误
在rhel8中,使用C++代码关联oracle12c时,使用自带库,可以编译成功。但是运行时,会提示:ORA-24960: the attribute OCI_ATTR_USERNAME is greater than the maximum allowable length of 255。错误原因: gcc-c++版本太高,需要更换低版本的。先删除自带的包,dnf remove gcc然...原创 2019-11-02 17:16:18 · 1008 阅读 · 0 评论 -
rhel8-snmp安装配置
在rhel8环境中,安装snmp后,发现会出现如下错误:$ snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.4.3.0End of MIB错误原因是: 配置文件没有修改。解决方案如下:一. 检查以下rpm包是否安装完毕,没安装则强制安装perl-Data-Dumper-2.167-399.el8.x86_64.rpmnet-...原创 2020-04-09 20:52:35 · 969 阅读 · 0 评论