[asterisk-users] CDR/MySQL basic config
Adrian Marsh
Adrian.Marsh at ubiquisys.com
Tue Aug 7 05:36:26 CDT 2007
Hmm.. This is what I get:
[root at ubiq-serv6 ~]# 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: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] 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 <Adrian.Marsh at ubiquisys.com> 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
jonforrest.beck at gmail.com
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
More information about the asterisk-users
mailing list