Can't Connect to mysql database


#1

After changing the static ip of our server, and changing asterisk config files accordingly, I haven’t been able to restore connection to our database.

I am able to connect using the isql command

[root@asterisk asterisk]# isql asterisk-connector +---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | | quit | | | +---------------------------------------+ SQL>

After reloading, ./configuring and make installing, I am still unable to connect.

[Aug 2 12:21:50] NOTICE[3325]: res_odbc.c:1480 odbc_obj_connect: Connecting asterisk [Aug 2 12:22:00] WARNING[3325]: res_odbc.c:1507 odbc_obj_connect: res_odbc: Error SQLConnect=-1 errno=2003 [unixODBC][MySQL][ODBC 5.1 Driver]Can't connect to MySQL server on '10.2.1.3' (4)

Does anybody know any other way that I can reset asterisk to force a connection? Obviously my settings are correct if I can connect through isql. Thanks


#2

change the same ip in your asterisk mysql configuration and check it out.


#3

Do you mean in res_odbc.conf? Here is what that looks like

[quote][asterisk]
enabled => yes
dsn => asterisk-connector
username => root
password => P4rad1gm
pre-connect => yes
pooling => no
limit => 5
[/quote]


#4

Can you post the content of file “odbc.ini” ?