Re: [asterisk-users] CDR/MySQL basic config
Hmm.. This is what I get: [EMAIL PROTECTED] ~]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 187143 to server version: 4.1.20 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql use asteriskcdrdb ; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql select Host from user where User = 'asteriskcdruser' ; ERROR 1146 (42S02): Table 'asteriskcdrdb.user' doesn't exist mysql Adrian Marsh -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Forrest Beck Sent: 07 August 2007 02:59 To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] CDR/MySQL basic config Adrian, What host/ip did you specify when you created the user? # mysql --user=root --password #mysql use mysql; #mysql select Host from user where User = 'asteriskcdruser' (this line is case sensitive) Does it return 127.0.0.1 or localhost. Make cdr_mysql reflect that. You should also check out cdr_odbc, asterisk can connect through an ODBC connection which in turn is a connection to the MySQL database. There seems to be more suport for the ODBC driver. Hope this helps some On 8/6/07, Adrian Marsh [EMAIL PROTECTED] wrote: Hi, I'm trying to add mysql CDR onto a vanilla Asterisk 1.2 install. The add-ons pack has been installed for a while, so now I'm trying to add the Mysql config. I've created a mysql database, added the grants for a user acces, and can run a mysql -u asteriskcdruser -p and can connect to the database. I've been using this as a guide: http://www.757.org/~joat/wiki/index.php/Asterisk#Viewing_CDR_Data_with_A sterisk:_CDR_Analyzer I've created cdr_mysql.conf: [global] hostname=localhost dbname=asteriskcdrdb table=cdr password=password user=asteriskcdruser port=3306 sock=/tmp/mysql.sock userfield=1 But when I start asterisk (1.4 on my test machine), I get: == Parsing '/etc/asterisk/cdr_mysql.conf': Found [Aug 6 21:01:14] ERROR[32512]: cdr_addon_mysql.c:436 my_load_module: Failed to connect to mysql database asteriskcdrdb on localhost. cdr_addon_mysql.so = (MySQL CDR Backend) [Aug 6 21:01:14] ERROR[32512]: res_config_mysql.c:627 mysql_reconnect: MySQL RealTime: Failed to connect database server on (err 2002). Check debug for more info. [Aug 6 21:01:14] WARNING[32512]: res_config_mysql.c:474 load_module: MySQL RealTime: Couldn't establish connection. Check debug. [Aug 6 21:01:14] NOTICE[32512]: config.c:1171 ast_config_engine_register: Registered Config Engine mysql MySQL RealTime driver loaded. res_config_mysql.so = (MySQL RealTime Configuration Driver) I'm also looking as to what CDR viewers there are available, and which people think are best. I want to view/report on the calls made within A*k. Thanks, Adrian ___ --Bandwidth and Colocation Provided by http://www.api-digital.com-- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- *** Forrest Beck IAXTEL: 17002871718 [EMAIL PROTECTED] http://www.shift8.biz ___ --Bandwidth and Colocation Provided by http://www.api-digital.com-- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ --Bandwidth and Colocation Provided by http://www.api-digital.com-- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] CDR/MySQL basic config
Hi, first step is correct Hmm.. This is what I get: [EMAIL PROTECTED] ~]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 187143 to server version: 4.1.20 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. You make an errore here : mysql use asteriskcdrdb users' information are stored in mysql db mysql use mysql; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql mysql select Host from user where User = 'asteriskcdruser' ; +---+ | Host | +---+ | localhost | +---+ 1 row in set (0.00 sec) mysql Are you sure that user 'asteriskcdruser' has the privileges to insert record in DB asteriskcdrdb? If not...allow 'asteriskcdruser' to insert record ^_^ mysql grant insert on asteriskcdrdb.* to [EMAIL PROTECTED] by 'asteriskcdruser'; mysql exit Reload asterisk and try On 8/7/07, Adrian Marsh [EMAIL PROTECTED] wrote: Hmm.. This is what I get: [EMAIL PROTECTED] ~]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 187143 to server version: 4.1.20 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql use asteriskcdrdb ; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql select Host from user where User = 'asteriskcdruser' ; ERROR 1146 (42S02): Table 'asteriskcdrdb.user' doesn't exist mysql Adrian Marsh -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Forrest Beck Sent: 07 August 2007 02:59 To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] CDR/MySQL basic config Adrian, What host/ip did you specify when you created the user? # mysql --user=root --password #mysql use mysql; #mysql select Host from user where User = 'asteriskcdruser' (this line is case sensitive) Does it return 127.0.0.1 or localhost. Make cdr_mysql reflect that. You should also check out cdr_odbc, asterisk can connect through an ODBC connection which in turn is a connection to the MySQL database. There seems to be more suport for the ODBC driver. Hope this helps some On 8/6/07, Adrian Marsh [EMAIL PROTECTED] wrote: Hi, I'm trying to add mysql CDR onto a vanilla Asterisk 1.2 install. The add-ons pack has been installed for a while, so now I'm trying to add the Mysql config. I've created a mysql database, added the grants for a user acces, and can run a mysql -u asteriskcdruser -p and can connect to the database. I've been using this as a guide: http://www.757.org/~joat/wiki/index.php/Asterisk#Viewing_CDR_Data_with_A sterisk:_CDR_Analyzer I've created cdr_mysql.conf: [global] hostname=localhost dbname=asteriskcdrdb table=cdr password=password user=asteriskcdruser port=3306 sock=/tmp/mysql.sock userfield=1 But when I start asterisk (1.4 on my test machine), I get: == Parsing '/etc/asterisk/cdr_mysql.conf': Found [Aug 6 21:01:14] ERROR[32512]: cdr_addon_mysql.c:436 my_load_module: Failed to connect to mysql database asteriskcdrdb on localhost. cdr_addon_mysql.so = (MySQL CDR Backend) [Aug 6 21:01:14] ERROR[32512]: res_config_mysql.c:627 mysql_reconnect: MySQL RealTime: Failed to connect database server on (err 2002). Check debug for more info. [Aug 6 21:01:14] WARNING[32512]: res_config_mysql.c:474 load_module: MySQL RealTime: Couldn't establish connection. Check debug. [Aug 6 21:01:14] NOTICE[32512]: config.c:1171 ast_config_engine_register: Registered Config Engine mysql MySQL RealTime driver loaded. res_config_mysql.so = (MySQL RealTime Configuration Driver) I'm also looking as to what CDR viewers there are available, and which people think are best. I want to view/report on the calls made within A*k. Thanks, Adrian ___ --Bandwidth and Colocation Provided by http://www.api-digital.com-- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- *** Forrest Beck IAXTEL: 17002871718 [EMAIL PROTECTED] http://www.shift8.biz ___ --Bandwidth and Colocation Provided by http://www.api-digital.com-- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ --Bandwidth and Colocation Provided by http://www.api-digital.com-- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- Alessandro R
Re: [asterisk-users] CDR/MySQL basic config
Hi Alessandro, Thanks for that.. I'm pretty sure about the user. I used Webmin to confirm the user configs, but I ran your commands anyway: mysql use mysql ; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql select Host from user where User = 'asteriskcdruser' ; +---+ | Host | +---+ | localhost | +---+ 1 row in set (0.00 sec) mysql grant insert on asteriskcdrdb.* to [EMAIL PROTECTED] identified by 'asteriskcdruser'; Query OK, 0 rows affected (0.00 sec) But I still get the failure: [Aug 7 15:14:10] ERROR[29103]: cdr_addon_mysql.c:436 my_load_module: Failed to connect to mysql database asteriskcdrdb on localhost. cdr_addon_mysql.so = (MySQL CDR Backend) [Aug 7 15:14:10] ERROR[29103]: res_config_mysql.c:627 mysql_reconnect: MySQL RealTime: Failed to connect database server on (err 2002). Check debug for more info. [Aug 7 15:14:10] WARNING[29103]: res_config_mysql.c:474 load_module: MySQL RealTime: Couldn't establish connection. Check debug. [Aug 7 15:14:10] NOTICE[29103]: config.c:1171 ast_config_engine_register: Registered Config Engine mysql MySQL RealTime driver loaded. res_config_mysql.so = (MySQL RealTime Configuration Driver) This box also das Cacti installed on it, which makes use of the MySql server as well (and all is ok there). Adrian Marsh From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alessandro Russo Sent: 07 August 2007 14:13 To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] CDR/MySQL basic config Hi, first step is correct Hmm.. This is what I get: [EMAIL PROTECTED] ~]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 187143 to server version: 4.1.20 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. You make an errore here : mysql use asteriskcdrdb users' information are stored in mysql db mysql use mysql; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql mysql select Host from user where User = 'asteriskcdruser' ; +---+ | Host | +---+ | localhost | +---+ 1 row in set (0.00 sec) mysql Are you sure that user 'asteriskcdruser' has the privileges to insert record in DB asteriskcdrdb? If not...allow 'asteriskcdruser' to insert record ^_^ mysql grant insert on asteriskcdrdb.* to [EMAIL PROTECTED] identified by 'asteriskcdruser'; mysql exit Reload asterisk and try On 8/7/07, Adrian Marsh [EMAIL PROTECTED] wrote: Hmm.. This is what I get: [EMAIL PROTECTED] ~]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 187143 to server version: 4.1.20 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql use asteriskcdrdb ; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql select Host from user where User = 'asteriskcdruser' ; ERROR 1146 (42S02): Table 'asteriskcdrdb.user' doesn't exist mysql Adrian Marsh -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] ] On Behalf Of Forrest Beck Sent: 07 August 2007 02:59 To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] CDR/MySQL basic config Adrian, What host/ip did you specify when you created the user? # mysql --user=root --password #mysql use mysql; #mysql select Host from user where User = 'asteriskcdruser' (this line is case sensitive) Does it return 127.0.0.1 or localhost. Make cdr_mysql reflect that. You should also check out cdr_odbc, asterisk can connect through an ODBC connection which in turn is a connection to the MySQL database. There seems to be more suport for the ODBC driver. Hope this helps some On 8/6/07, Adrian Marsh [EMAIL PROTECTED] wrote: Hi, I'm trying to add mysql CDR onto a vanilla Asterisk 1.2 install. The add-ons pack has been installed for a while, so now I'm trying to add the Mysql config. I've created a mysql database, added the grants for a user acces, and can run a mysql -u asteriskcdruser -p and can connect to the database. I've been using this as a guide: http://www.757.org/~joat/wiki/index.php/Asterisk#Viewing_CDR_Data_with_A sterisk:_CDR_Analyzer I've created cdr_mysql.conf: [global] hostname=localhost dbname=asteriskcdrdb table=cdr password=password user=asteriskcdruser port=3306 sock=/tmp/mysql.sock userfield=1 But when I start asterisk (1.4 on my test machine), I get: == Parsing '/etc/asterisk/cdr_mysql.conf': Found [Aug
Re: [asterisk-users] CDR/MySQL basic config
Hi, try to login as asteriskcdruser to mysql # mysql -u asteriskcdruser -p Enter password: password Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 12 Server version: 5.0.32-Debian_7etch1-log Debian etch distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql Can you login with asteriskcdruser? If you cannot login there are some problems with privileges or...I don't know :( On 8/7/07, Adrian Marsh [EMAIL PROTECTED] wrote: Hi Alessandro, Thanks for that.. I'm pretty sure about the user. I used Webmin to confirm the user configs, but I ran your commands anyway: mysql use mysql ; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql select Host from user where User = 'asteriskcdruser' ; +---+ | Host | +---+ | localhost | +---+ 1 row in set (0.00 sec) mysql grant insert on asteriskcdrdb.* to [EMAIL PROTECTED] by 'asteriskcdruser'; Query OK, 0 rows affected (0.00 sec) But I still get the failure: [Aug 7 15:14:10] ERROR[29103]: cdr_addon_mysql.c:436 my_load_module: Failed to connect to mysql database asteriskcdrdb on localhost. cdr_addon_mysql.so = (MySQL CDR Backend) [Aug 7 15:14:10] ERROR[29103]: res_config_mysql.c:627 mysql_reconnect: MySQL RealTime: Failed to connect database server on (err 2002). Check debug for more info. [Aug 7 15:14:10] WARNING[29103]: res_config_mysql.c:474 load_module: MySQL RealTime: Couldn't establish connection. Check debug. [Aug 7 15:14:10] NOTICE[29103]: config.c:1171 ast_config_engine_register: Registered Config Engine mysql MySQL RealTime driver loaded. res_config_mysql.so = (MySQL RealTime Configuration Driver) This box also das Cacti installed on it, which makes use of the MySql server as well (and all is ok there). Adrian Marsh -- *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Alessandro Russo *Sent:* 07 August 2007 14:13 *To:* Asterisk Users Mailing List - Non-Commercial Discussion *Subject:* Re: [asterisk-users] CDR/MySQL basic config Hi, first step is correct Hmm.. This is what I get: [EMAIL PROTECTED] ~]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 187143 to server version: 4.1.20 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. You make an errore here : mysql use asteriskcdrdb users' information are stored in mysql db mysql use mysql; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql mysql select Host from user where User = 'asteriskcdruser' ; +---+ | Host | +---+ | localhost | +---+ 1 row in set (0.00 sec) mysql Are you sure that user 'asteriskcdruser' has the privileges to insert record in DB asteriskcdrdb? If not...allow 'asteriskcdruser' to insert record ^_^ mysql grant insert on asteriskcdrdb.* to [EMAIL PROTECTED] by 'asteriskcdruser'; mysql exit Reload asterisk and try On 8/7/07, *Adrian Marsh* [EMAIL PROTECTED] wrote: Hmm.. This is what I get: [EMAIL PROTECTED] ~]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 187143 to server version: 4.1.20 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql use asteriskcdrdb ; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql select Host from user where User = 'asteriskcdruser' ; ERROR 1146 (42S02): Table 'asteriskcdrdb.user' doesn't exist mysql Adrian Marsh -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] ] On Behalf Of Forrest Beck Sent: 07 August 2007 02:59 To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] CDR/MySQL basic config Adrian, What host/ip did you specify when you created the user? # mysql --user=root --password #mysql use mysql; #mysql select Host from user where User = 'asteriskcdruser' (this line is case sensitive) Does it return 127.0.0.1 or localhost. Make cdr_mysql reflect that. You should also check out cdr_odbc, asterisk can connect through an ODBC connection which in turn is a connection to the MySQL database. There seems to be more suport for the ODBC driver. Hope this helps some On 8/6/07, Adrian Marsh [EMAIL PROTECTED] wrote: Hi, I'm trying to add mysql CDR onto
Re: [asterisk-users] CDR/MySQL basic config
sock=/tmp/mysql.sock Is this path for socket correct ? In some distro it is /var/lib/mysql/mysql.sock . Type locate mysql.sock in shell . Also remove uncomment port=3306 if using socket to connect . On 07/08/07, Alessandro Russo [EMAIL PROTECTED] wrote: Hi, try to login as asteriskcdruser to mysql # mysql -u asteriskcdruser -p Enter password: password Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 12 Server version: 5.0.32-Debian_7etch1-log Debian etch distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql Can you login with asteriskcdruser? If you cannot login there are some problems with privileges or...I don't know :( On 8/7/07, Adrian Marsh [EMAIL PROTECTED] wrote: Hi Alessandro, Thanks for that.. I'm pretty sure about the user. I used Webmin to confirm the user configs, but I ran your commands anyway: mysql use mysql ; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql select Host from user where User = 'asteriskcdruser' ; +---+ | Host | +---+ | localhost | +---+ 1 row in set (0.00 sec) mysql grant insert on asteriskcdrdb.* to [EMAIL PROTECTED] by 'asteriskcdruser'; Query OK, 0 rows affected (0.00 sec) But I still get the failure: [Aug 7 15:14:10] ERROR[29103]: cdr_addon_mysql.c:436 my_load_module: Failed to connect to mysql database asteriskcdrdb on localhost. cdr_addon_mysql.so = (MySQL CDR Backend) [Aug 7 15:14:10] ERROR[29103]: res_config_mysql.c:627 mysql_reconnect: MySQL RealTime: Failed to connect database server on (err 2002). Check debug for more info. [Aug 7 15:14:10] WARNING[29103]: res_config_mysql.c:474 load_module: MySQL RealTime: Couldn't establish connection. Check debug. [Aug 7 15:14:10] NOTICE[29103]: config.c:1171 ast_config_engine_register: Registered Config Engine mysql MySQL RealTime driver loaded. res_config_mysql.so = (MySQL RealTime Configuration Driver) This box also das Cacti installed on it, which makes use of the MySql server as well (and all is ok there). Adrian Marsh -- *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Alessandro Russo *Sent:* 07 August 2007 14:13 *To:* Asterisk Users Mailing List - Non-Commercial Discussion *Subject:* Re: [asterisk-users] CDR/MySQL basic config Hi, first step is correct Hmm.. This is what I get: [EMAIL PROTECTED] ~]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 187143 to server version: 4.1.20 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. You make an errore here : mysql use asteriskcdrdb users' information are stored in mysql db mysql use mysql; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql mysql select Host from user where User = 'asteriskcdruser' ; +---+ | Host | +---+ | localhost | +---+ 1 row in set (0.00 sec) mysql Are you sure that user 'asteriskcdruser' has the privileges to insert record in DB asteriskcdrdb? If not...allow 'asteriskcdruser' to insert record ^_^ mysql grant insert on asteriskcdrdb.* to [EMAIL PROTECTED] by 'asteriskcdruser'; mysql exit Reload asterisk and try On 8/7/07, *Adrian Marsh* [EMAIL PROTECTED] wrote: Hmm.. This is what I get: [EMAIL PROTECTED] ~]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 187143 to server version: 4.1.20 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql use asteriskcdrdb ; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql select Host from user where User = 'asteriskcdruser' ; ERROR 1146 (42S02): Table 'asteriskcdrdb.user' doesn't exist mysql Adrian Marsh -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] ] On Behalf Of Forrest Beck Sent: 07 August 2007 02:59 To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] CDR/MySQL basic config Adrian, What host/ip did you specify when you created the user? # mysql --user=root --password #mysql use mysql; #mysql select Host from user
Re: [asterisk-users] CDR/MySQL basic config
Hi, this is my cdr_mysql.conf [global] hostname=localhost dbname=asterisk table=cdr password= mypassword user=asteriskcdr ;port=3306 ;sock=/tmp/mysql.sock ;userfield=1 as you can see, the last three are comment out, try to comment these rows, your system could be able to retrieve the sock in same way...maybe. My debian :) /var/run/mysqld/mysqld.sock bye On 8/7/07, Jaswinder Singh [EMAIL PROTECTED] wrote: sock=/tmp/mysql.sock Is this path for socket correct ? In some distro it is /var/lib/mysql/mysql.sock . Type locate mysql.sock in shell . Also remove uncomment port=3306 if using socket to connect . On 07/08/07, Alessandro Russo [EMAIL PROTECTED] wrote: Hi, try to login as asteriskcdruser to mysql # mysql -u asteriskcdruser -p Enter password: password Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 12 Server version: 5.0.32-Debian_7etch1-log Debian etch distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql Can you login with asteriskcdruser? If you cannot login there are some problems with privileges or...I don't know :( On 8/7/07, Adrian Marsh [EMAIL PROTECTED] wrote: Hi Alessandro, Thanks for that.. I'm pretty sure about the user. I used Webmin to confirm the user configs, but I ran your commands anyway: mysql use mysql ; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql select Host from user where User = 'asteriskcdruser' ; +---+ | Host | +---+ | localhost | +---+ 1 row in set (0.00 sec) mysql grant insert on asteriskcdrdb.* to [EMAIL PROTECTED] by 'asteriskcdruser'; Query OK, 0 rows affected (0.00 sec) But I still get the failure: [Aug 7 15:14:10] ERROR[29103]: cdr_addon_mysql.c:436 my_load_module: Failed to connect to mysql database asteriskcdrdb on localhost. cdr_addon_mysql.so = (MySQL CDR Backend) [Aug 7 15:14:10] ERROR[29103]: res_config_mysql.c:627 mysql_reconnect: MySQL RealTime: Failed to connect database server on (err 2002). Check debug for more info. [Aug 7 15:14:10] WARNING[29103]: res_config_mysql.c:474 load_module: MySQL RealTime: Couldn't establish connection. Check debug. [Aug 7 15:14:10] NOTICE[29103]: config.c:1171 ast_config_engine_register: Registered Config Engine mysql MySQL RealTime driver loaded. res_config_mysql.so = (MySQL RealTime Configuration Driver) This box also das Cacti installed on it, which makes use of the MySql server as well (and all is ok there). Adrian Marsh -- *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Alessandro Russo *Sent:* 07 August 2007 14:13 *To:* Asterisk Users Mailing List - Non-Commercial Discussion *Subject:* Re: [asterisk-users] CDR/MySQL basic config Hi, first step is correct Hmm.. This is what I get: [EMAIL PROTECTED] ~]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 187143 to server version: 4.1.20 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. You make an errore here : mysql use asteriskcdrdb users' information are stored in mysql db mysql use mysql; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql mysql select Host from user where User = 'asteriskcdruser' ; +---+ | Host | +---+ | localhost | +---+ 1 row in set (0.00 sec) mysql Are you sure that user 'asteriskcdruser' has the privileges to insert record in DB asteriskcdrdb? If not...allow 'asteriskcdruser' to insert record ^_^ mysql grant insert on asteriskcdrdb.* to [EMAIL PROTECTED] by 'asteriskcdruser'; mysql exit Reload asterisk and try On 8/7/07, *Adrian Marsh* [EMAIL PROTECTED] wrote: Hmm.. This is what I get: [EMAIL PROTECTED] ~]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 187143 to server version: 4.1.20 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql use asteriskcdrdb ; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup
[asterisk-users] CDR/MySQL basic config
Hi, I'm trying to add mysql CDR onto a vanilla Asterisk 1.2 install. The add-ons pack has been installed for a while, so now I'm trying to add the Mysql config. I've created a mysql database, added the grants for a user acces, and can run a mysql -u asteriskcdruser -p and can connect to the database. I've been using this as a guide: http://www.757.org/~joat/wiki/index.php/Asterisk#Viewing_CDR_Data_with_A sterisk:_CDR_Analyzer I've created cdr_mysql.conf: [global] hostname=localhost dbname=asteriskcdrdb table=cdr password=password user=asteriskcdruser port=3306 sock=/tmp/mysql.sock userfield=1 But when I start asterisk (1.4 on my test machine), I get: == Parsing '/etc/asterisk/cdr_mysql.conf': Found [Aug 6 21:01:14] ERROR[32512]: cdr_addon_mysql.c:436 my_load_module: Failed to connect to mysql database asteriskcdrdb on localhost. cdr_addon_mysql.so = (MySQL CDR Backend) [Aug 6 21:01:14] ERROR[32512]: res_config_mysql.c:627 mysql_reconnect: MySQL RealTime: Failed to connect database server on (err 2002). Check debug for more info. [Aug 6 21:01:14] WARNING[32512]: res_config_mysql.c:474 load_module: MySQL RealTime: Couldn't establish connection. Check debug. [Aug 6 21:01:14] NOTICE[32512]: config.c:1171 ast_config_engine_register: Registered Config Engine mysql MySQL RealTime driver loaded. res_config_mysql.so = (MySQL RealTime Configuration Driver) I'm also looking as to what CDR viewers there are available, and which people think are best. I want to view/report on the calls made within A*k. Thanks, Adrian ___ --Bandwidth and Colocation Provided by http://www.api-digital.com-- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] CDR/MySQL basic config
Adrian, What host/ip did you specify when you created the user? # mysql --user=root --password #mysql use mysql; #mysql select Host from user where User = 'asteriskcdruser' (this line is case sensitive) Does it return 127.0.0.1 or localhost. Make cdr_mysql reflect that. You should also check out cdr_odbc, asterisk can connect through an ODBC connection which in turn is a connection to the MySQL database. There seems to be more suport for the ODBC driver. Hope this helps some On 8/6/07, Adrian Marsh [EMAIL PROTECTED] wrote: Hi, I'm trying to add mysql CDR onto a vanilla Asterisk 1.2 install. The add-ons pack has been installed for a while, so now I'm trying to add the Mysql config. I've created a mysql database, added the grants for a user acces, and can run a mysql -u asteriskcdruser -p and can connect to the database. I've been using this as a guide: http://www.757.org/~joat/wiki/index.php/Asterisk#Viewing_CDR_Data_with_A sterisk:_CDR_Analyzer I've created cdr_mysql.conf: [global] hostname=localhost dbname=asteriskcdrdb table=cdr password=password user=asteriskcdruser port=3306 sock=/tmp/mysql.sock userfield=1 But when I start asterisk (1.4 on my test machine), I get: == Parsing '/etc/asterisk/cdr_mysql.conf': Found [Aug 6 21:01:14] ERROR[32512]: cdr_addon_mysql.c:436 my_load_module: Failed to connect to mysql database asteriskcdrdb on localhost. cdr_addon_mysql.so = (MySQL CDR Backend) [Aug 6 21:01:14] ERROR[32512]: res_config_mysql.c:627 mysql_reconnect: MySQL RealTime: Failed to connect database server on (err 2002). Check debug for more info. [Aug 6 21:01:14] WARNING[32512]: res_config_mysql.c:474 load_module: MySQL RealTime: Couldn't establish connection. Check debug. [Aug 6 21:01:14] NOTICE[32512]: config.c:1171 ast_config_engine_register: Registered Config Engine mysql MySQL RealTime driver loaded. res_config_mysql.so = (MySQL RealTime Configuration Driver) I'm also looking as to what CDR viewers there are available, and which people think are best. I want to view/report on the calls made within A*k. Thanks, Adrian ___ --Bandwidth and Colocation Provided by http://www.api-digital.com-- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- *** Forrest Beck IAXTEL: 17002871718 [EMAIL PROTECTED] http://www.shift8.biz ___ --Bandwidth and Colocation Provided by http://www.api-digital.com-- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users