[Home]

Summary:ASTERISK-13081: addmin/res_config_mysql - Invalid Database
Reporter:Visu Kaka (visu)Labels:
Date Opened:2008-11-17 22:17:35.000-0600Date Closed:2011-06-07 14:02:55
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Addons/res_config_mysql
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:MySQL realtime stopped working on latest trunk 157167. Same database works fine with older trunk (114093)

Following is warning message I get from asterisk:

[Nov 17 08:56:49] WARNING[29489]: res_config_mysql.c:317 realtime_mysql: MySQL RealTime: Invalid database specified: ast_db

*CLI> realtime mysql status
general connected to ast_db@127.0.0.1, port 3306 with username ast_db for 0 seconds.


****** ADDITIONAL INFORMATION ******

Same database works fine with older trunk (114093)
Comments:By: Sean Bright (seanbright) 2008-11-18 19:41:19.000-0600

Did you also update addons to the latest version from trunk as well?  There have been changes made recently (in the last 2 weeks) which might be causing your problem.

By: Tilghman Lesher (tilghman) 2008-11-18 23:34:30.000-0600

Please upload the contents of your res_mysql.conf and extconfig.conf.



By: Tilghman Lesher (tilghman) 2008-11-18 23:40:54.000-0600

Now that I look at my extconfig.conf, I know what the problem is.  In the past, the MySQL driver ignored the second field in extconfig.conf, the field which specifies the database.  Now it pays attention to that field, and its contents must point to a category name in res_mysql.conf.  If you want read/write separation, define the second field in extconfig.conf with the respective category names, separated by a slash, read database first.

By: Visu Kaka (visu) 2008-11-18 23:52:51.000-0600

yes, it is picked up from latest trunk.

Below are content

#cat /etc/asterisk/res_mysql.conf
;
[general]
dbhost = 127.0.0.1
dbname = ast_db
dbuser = ast_db
dbpass = somepass
dbport = 3306
;dbsock = /tmp/mysql.sock


# cat /etc/asterisk/extconfig.conf
[settings]
;iaxusers => odbc,asterisk
;iaxpeers => odbc,asterisk
;sipusers => odbc,asterisk
sipusers => mysql,ast_db,sip_buddies
sippeers => mysql,ast_db,sip_buddies
extensions => mysql,ast_db,extensions_table
;voicemail => odbc,asterisk
;extensions => odbc,asterisk
;queues => odbc,asterisk
;queue_members => odbc,asterisk

By: Tilghman Lesher (tilghman) 2008-11-19 00:12:21.000-0600

Right, so change it to:

sipusers => mysql,general,sip_buddies
sippeers => mysql,general,sip_buddies
extensions => mysql,general,extensions_table

as [general] is the category in res_mysql.conf.

By: Visu Kaka (visu) 2008-11-20 09:34:04.000-0600

thanks.

By: Sean Bright (seanbright) 2008-11-20 10:02:06.000-0600

visu,

Did Corydon76's suggestion work for you?  If so we'd like to close the issue.

Sean

By: Chris Maciejewski (chris-mac) 2008-11-23 09:09:47.000-0600

Hi, just wanted to inform had exactly the same problem as described by visu, and Corydon76's suggestion worked fine for me.

Chris