Difference between revisions of "Asterisk can't connect to MySQL database"

From Kolmisoft Wiki
Jump to navigationJump to search
(New page: If your asterisk is unable connect to your database, there could be several problems. 1) Make sure you have correct connection info in these files: /home/mor/config/database.yml /etc...)
 
Line 8: Line 8:
   /var/lib/asterisk/agi-bin/mor.conf
   /var/lib/asterisk/agi-bin/mor.conf
   /home/mor/public/c2c/c2c.php
   /home/mor/public/c2c/c2c.php
  /etc/asterisk/extconfig.conf -> make sure in this file correct database name is entered:
  iaxusers = mysql,'''mor''',devices                                                                                                                                                       
  iaxpeers = mysql,'''mor''',devices                                                                                                                                                       
  sipusers = mysql,'''mor''',devices                                                                                                                                                       
  sippeers = mysql,'''mor''',devices                                                                                                                                                       
  realtime_ext => mysql,'''mor''',extlines                                                                                                                                                 
  voicemail => mysql,mor_app02,voicemail_boxes


2) Check for /etc/hosts file, there could be incorrect info.
2) Check for /etc/hosts file, there could be incorrect info.


3) Check for DNS, ping MySQL server and double check if packets reaching MySQL server. iptraf program is very usefull in such situations.
3) Check for DNS, ping MySQL server and double check if packets reaching MySQL server. iptraf program is very usefull in such situations.

Revision as of 11:35, 22 November 2011

If your asterisk is unable connect to your database, there could be several problems.

1) Make sure you have correct connection info in these files:

 /home/mor/config/database.yml
 /etc/asterisk/mor.conf
 /etc/asterisk/res_mysql.conf
 /var/lib/asterisk/agi-bin/mor.conf
 /home/mor/public/c2c/c2c.php
 /etc/asterisk/extconfig.conf -> make sure in this file correct database name is entered: 
 iaxusers = mysql,mor,devices                                                                                                                                                        
 iaxpeers = mysql,mor,devices                                                                                                                                                        
 sipusers = mysql,mor,devices                                                                                                                                                        
 sippeers = mysql,mor,devices                                                                                                                                                        
 realtime_ext => mysql,mor,extlines                                                                                                                                                  
 voicemail => mysql,mor_app02,voicemail_boxes

2) Check for /etc/hosts file, there could be incorrect info.

3) Check for DNS, ping MySQL server and double check if packets reaching MySQL server. iptraf program is very usefull in such situations.