ODBC Connection Problem

Home » Asterisk Users » ODBC Connection Problem
Asterisk Users 7 Comments

Hi All,

OS : CentOS 5 64bit OS & Machine Asterisk:
ODBC Packages:


enabled => yes dsn => telco-ops username => dba password => c3podb@2012
pre-connect => yes sanitysql => select 1
idlecheck => 15
;isolation => repeatable_read pooling => yes limit => 3600
connect_timeout => 10
negative_connection_cache => 30

Above is my installation package and configuration file (res_odbc.conf), when I try to execute “odbc show all” it always gives below output.

*CLI> odbc show all

ODBC DSN Settings

7 thoughts on - ODBC Connection Problem

  • /etc/odbc.ini

    Description = Asterisk realtime and other FUNC_ODBC access Driver = MySQL
    Server =
    Socket = /var/lib/mysql/data3306/mysql.sock User = dba Password = c3podb@2012
    Database = mytelcoexample Port = 3306
    Option = 3

  • In case you didn’t realize you were sending this out publicly to a publicly archived and searchable list, you might want to change that password now.

  • Private subnet or not, that’s a social engineering and recon target. If all it takes is a Google search for this guy’s name and “password”, that’s dangerous.

  • First of all test your odbc-connection via console:
    isql telco-ops dba c3podb@2012 -v You should see a “Connected!”-Message. Do you?

    Second: yes I also had problems setting up odbc. The main
    “problem/error” for me was, that documentation is sometimes confusing. Here is my config. Please notice the [section] – namings:

    Description = MySQL ODBCMyODBC Driver Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so FileUsage = 1

    Description = MySQL ODBC Driver Driver = MySQL
    Socket = /var/run/mysqld/mysqld.sock Server = localhost User = my_username Password = my_password Database = my_database Option = 3
    Port Charset = utf8

    enabled => yes dsn => MySQL-asterisk username => my_username password => my_password pre-connect => yes

    dsn=mysql loguniqueid=yes dispositionstring=yes table