1.配置unixODBC
/etc/odbc.ini
[mysql]
Driver =/usr/lib/libmyodbc5w.so
Server =192.168.1.50
User =mysql
Password=mysql
Port =3306
database=edmond
Charset =GBK
在MySQL创建测试表
create table t(a varchar(20) primary key) engine=innodb,charset =gbk;
insert into t values('透明');
commit;
查看结果:
如果前台报错如下所示
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[
$ORACLE_HOME/hs/log的后台日志报错如下:
hgopoer, line 233: got native error 0 and sqlstate I; message follows...
[
Exiting hgopoer, rc=0 at 2014/03/04-21:40:18
hgocont, line 2752: calling SqlDriverConnect got sqlstate I
Exiting hgocont, rc=28500 at 2014/03/04-21:40:18 with error ptr FILE:hgocont.c LINE:2772 FUNCTION:hgocont() ID:Something other than invalid authorization
Exiting hgolgon, rc=28500 at 2014/03/04-21:40:18 with error ptr FILE:hgolgon.c LINE:781 FUNCTION:hgolgon() ID:Calling hgocont
Entered hgoexit at 2014/03/04-21:40:18