Failed to connect to MySQL-asterisk

Files need to check are:

/etc/asterisk/res_odbc.conf

/etc/odbcinst.ini

To resolve this , You have to check the correct configuration of above file.

For Example :

in —  /etc/odbcinst.ini

[MySQL]
Description = ODBC for MySQL
Driver = /usr/lib/libmyodbc3.so
Setup = /usr/lib/libodbcmyS.so
FileUsage = 1

or

[asterisk-connector]
Description           = MySQL connection to 'asterisk' database
Driver                = MySQL
Database              = asterisk
Server                = localhost
UserName              = asterisk
Password              = welcome
Port                  = 3306
Socket                = /var/lib/mysql/mysql.sock

And in  res_odbc.conf 

[asterisk]
enabled => yes
dsn => asterisk-connector
username => asterisk
password => welcome
pooling => no
limit => 1
pre-connect => yes

One thought on “Failed to connect to MySQL-asterisk

  • November 6, 2014 at 4:30 am
    Permalink

    To verify data source, login in asterisk CLI, I executed a command “odbc show”

Leave a Reply