[asterisk-dev] Asterisk 1.6 Addon-beta-3 res_mysql notes

JR Richardson jmr.richardson at gmail.com
Thu May 22 10:41:33 CDT 2008


Hi All,

I was able to get Asterisk 1.6 setup with the addon package.  I'm
specifically testing the mysql addon. Here are some observations:

1. I didn't see in the README about the need for the mysql-client-dev
dependency, should be added somewhere.

2. The sample config file does not include info about using separate
database connections for read/write activity, should have something
like this:

;[general]                ;connect read and write operation to the same database
;dbhost = 10.10.14.107
;dbname = asterisk
;dbuser = asterisk
;dbpass = password
;dbport = 3306
;dbsock = /tmp/mysql.sock

;[read]                   ;connect read operation to different
database that write
;dbhost = 127.0.0.1
;dbname = asterisk
;dbuser = asterisk
;dbpass = password
;dbport = 3306
;dbsock = /tmp/mysql.sock

;[write]               ;connect write operation to different database that read
;dbhost = 10.10.10.105
;dbname = asterisk
;dbuser = asterisk
;dbpass = password
;dbport = 3306
;dbsock = /tmp/mysql.sock

3. The cli cmd 'realtime mysql status' does not show properly when 2
separate databases are uses, only shows the first database connection
configured, read or write:

lab11*CLI> realtime mysql status
Connected to asterisk at 127.0.0.1, port 3306 with username asterisk for 6 seconds.

The original patch 5881 did show connections to a [read] and a [write] database:

lab1*CLI> realtime mysql status
[read]: Connected to asterisk at 127.0.0.1, port 3306 with username
asterisk for 15 seconds.
[write]: Connected to asterisk at 10.10.10.105, port 3306 with username
asterisk for 14 seconds.

This was very helpful for setup and trouble shooting.

4. There is a error message when reloading res_config_mysql.so at the cli:

lab11*CLI> reload res_config_mysql.so
    -- Reloading module 'res_config_mysql.so' (MySQL RealTime
Configuration Driver)
  == Parsing '/etc/asterisk/res_mysql.conf':   == Found
[May 22 10:03:02] ERROR[24556]: res_config_mysql.c:855
mysql_reconnect: MySQL RealTime: Ping failed (2006).  Trying an
explicit reconnect.
[May 22 10:03:02] ERROR[24556]: res_config_mysql.c:855
mysql_reconnect: MySQL RealTime: Ping failed (2006).  Trying an
explicit reconnect.
  == MySQL RealTime reloaded.

This error, I think, is not a big concern, because as fast as I can
reload and initiate a connection, read or write, the database is
accessible.  I did not see this error in the past with the original
patch 5881.

Overall the mysql connections seems to be working well, I like the
improvements in the connection handling.  Very good progress.

Thanks.

JR
-- 
JR Richardson
Engineering for the Masses



More information about the asterisk-dev mailing list