Failed to connect to MySQL-asterisk

Rate this post

Files need to check are:



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

For Example :

in —  /etc/odbcinst.ini

Description = ODBC for MySQL
Driver = /usr/lib/
Setup = /usr/lib/
FileUsage = 1


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 

enabled => yes
dsn => asterisk-connector
username => asterisk
password => welcome
pooling => no
limit => 1
pre-connect => yes
For any query or issue, feel free to discuss on

One thought on “Failed to connect to MySQL-asterisk

  • November 6, 2014 at 4:30 am

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


Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: