[Freeswitch-users] ODBC through JS

Gayatri Kulkarni xtpl.gayatri at gmail.com
Mon Oct 20 06:11:03 PDT 2008


*First:*
Syntax for isql: isql <DSN> <username> <password>

Next:
Make sure your /usr/local/etc/odbcinst.ini *matches* /root/.odbc.ini

Create a database in the DSN which you can test on

*Sample odbc ini:*
[ODBC Data Sources]
MySQL              = MySQL Database Driver

[MySQL]
Description             = MySQL Database Driver
Driver          = /usr/local/lib/<name-of-your-lib-odbc.so>
Trace           = Yes
TraceFile               = sql.log
Database                = <database name>
Servername              = <IP of server on which DB is installed>
UserName                = <username>
Password                = <password>
Port            = <port no for mysql>
Protocol                = 6.4
ReadOnly                = No
RowVersioning           = No
ShowSystemTables                = No
ShowOidColumn           = No
FakeOidIndex            = No
ConnSettings            =

[Default]
Driver          = /usr/local/lib/<name-of-your-lib-odbc.so>

[ODBC]
Trace           = 1
TraceFile               = /var/log/odbctrace.out
Driver          = /usr/local/lib/<name-of-your-lib-odbc.so>

Follow steps given on: http://www.unixodbc.org/odbcinst.html ---

odbcinst -i -d -f template_file
odbcinst -i -s -f template_file

They install the drivers you list in the ini files
I doubt there will be anything left to do after that!
Hope this helps

-- 
Regards,
Gayatri Kulkarni

On Mon, Oct 20, 2008 at 3:55 PM, Baskar <yudha2008 at gmail.com> wrote:

> Hi,
>
> Using isql i get these error
> [root at hp30094686650 ~]# isql ODBC
> [ISQL]ERROR: Could not SQLConnect
>
>
> when i run odbcinst -j on my system, it shows me also 3 files
>
> [root at hp30094686650 ~]# odbcinst -j
> unixODBC 2.2.12
> DRIVERS............: /usr/local/etc/odbcinst.ini
> SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini
> USER DATA SOURCES..: /root/.odbc.ini
>
>
>
> * /usr/local/etc/.odbc.ini*
> [ODBC]
> Description = mysql
> Trace       = Off
> TraceFile   = stderr
> Driver      = mysql
> SERVER      = 172.20.176.32
> USER        = optimus
> PASSWORD    = optimus
> PORT        = 3306
> DATABASE    = freeswitch
>
>
>  */usr/local/etc/odbcinst.ini*
>
> [mysql]
> Description = MYSQL driver
> Driver      = /usr/local/lib/libmyodbc3.so
> Setup       = /usr/local/lib/libodbcmyS.so
>
> CPTimeout   =
> CPReuse     =
> FileUsage   = 1
>
> I what to connect to mysql please correct me where i am worng
> --
> Warm Regards,
> N.Baskar
>
>
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20081020/fe13823b/attachment-0002.html 


More information about the FreeSWITCH-users mailing list