hi, I’m getting this error on my pbx
ERROR[6723] res_config_odbc.c: No database handle available with the name of ‘asterisk’ (check res_odbc.conf)
Asterisk Version - 13.7.2
OS - Unbuntu Server 14-04(64 Bit)
This is my setting:
root@pbx:~# cat /etc/odbcinst.ini
[MySQL]
Description = ODBC for MySQL
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so
FileUsage = 1
root@pbx:~# cat /etc/odbc.ini
[MYSQL-TravMan4]
Description = TravMan4 MySQL ODBC
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so
Socket = /var/run/mysqld/mysqld.sock
Server = localhost
User = root
Password= 123456
Port = 3306
Database= TravMan4
Option = 3
[MYSQL-asteridex]
Description = asteridex MySQL ODBC
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so
Socket = /var/run/mysqld/mysqld.sock
Server = localhost
User = root
Password= 123456
Port = 3306
Database= asteridex
Option = 3
[MYSQL-asterisk]
Description = asterisk MySQL ODBC
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so
Socket = /var/run/mysqld/mysqld.sock
Server = localhost
User = root
Password= 123456
Port = 3306
Database= asterisk
Option = 3
[MYSQL-asteriskcdrdb]
Description = asteriskcdrdb MySQL ODBC
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so
Socket = /var/run/mysqld/mysqld.sock
Server = localhost
User = root
Password= 123456
Port = 3306
Database= asteriskcdrdb
Option = 3
[MYSQL-mysql]
Description = mysql MySQL ODBC
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so
Socket = /var/run/mysqld/mysqld.sock
Server = localhost
User = root
Password= 123456
Port = 3306
Database= mysql
Option = 3
[MYSQL-performance_schema]
Description = performance_schema MySQL ODBC
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so
Socket = /var/run/mysqld/mysqld.sock
Server = localhost
User = root
Password= 123456
Port = 3306
Database= performance_schema
Option = 3
[MYSQL-timeclock]
Description = timeclock MySQL ODBC
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so
Socket = /var/run/mysqld/mysqld.sock
Server = localhost
User = root
Password= 123456
Port = 3306
Database= timeclock
Option = 3
[MYSQL-zipcodes]
Description = zipcodes MySQL ODBC
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so
Socket = /var/run/mysqld/mysqld.sock
Server = localhost
User = root
Password= 123456
Port = 3306
Database= zipcodes
Option = 3
root@pbx:~# cat /etc/asterisk/res_odbc.conf
;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make ;
; custom modifications, details at: http://freepbx.org/configuration_files ;
;--------------------------------------------------------------------------------;
;
; This file is part of FreePBX.
;
; FreePBX is free software: you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation, either version 2 of the License, or
; (at your option) any later version.
;
; FreePBX is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with FreePBX. If not, see http://www.gnu.org/licenses/.
;
; Copyright © 2012 Astrogen LLC (USA)
#include res_odbc_custom.conf
#include res_odbc_additional.conf
root@pbx:~# cat /etc/asterisk/res_odbc_custom.conf
[MySQL-TravMan4]
enabled => yes
dsn => MySQL-TravMan4
username => root
password => 123456
preconnect => yes
[MySQL-asteridex]
enabled => yes
dsn => MySQL-asteridex
username => root
password => 123456
preconnect => yes
[MySQL-asterisk]
enabled => yes
dsn => MySQL-asterisk
username => root
password => 123456
preconnect => yes
[MySQL-asteriskcdrdb]
enabled => yes
dsn => MySQL-asteriskcdrdb
username => root
password => 123456
preconnect => yes
[MySQL-mysql]
enabled => yes
dsn => MySQL-mysql
username => root
password => 123456
preconnect => yes
[MySQL-performance_schema]
enabled => yes
dsn => MySQL-performance_schema
username => root
password => 123456
preconnect => yes
[MySQL-timeclock]
enabled => yes
dsn => MySQL-timeclock
username => root
password => 123456
preconnect => yes
[MySQL-zipcodes]
enabled => yes
dsn => MySQL-zipcodes
username => root
password => 123456
preconnect => yes
root@pbx:~# cat /etc/asterisk/res_odbc_additional.conf
;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. ;
;--------------------------------------------------------------------------------;
; For information on adding additional paramaters to this file, please visit the ;
; FreePBX.org wiki page, or ask on IRC. This file was created by the new FreePBX ;
; BMO - Big Module Object. Any similarity in naming with BMO from Adventure Time ;
; is totally deliberate. ;
;--------------------------------------------------------------------------------;
[asteriskcdrdb]
enabled=>yes
dsn=>MySQL-asteriskcdrdb
pooling=>no
limit=>1
pre-connect=>yes
username=>asteriskuser
password=>123456