[asterisk-users] Unable to insert cdr-data into mysql-DB

Andrew Thomas andy at datavox.co.uk
Tue Jan 25 03:36:44 CST 2011


Try changing 'hostname=127.0.0.1' to 'hostname=localhost' in the
cdr_mysql.conf.  I seem to remember a problem I had when '127.0.0.1' and
'localhost' didn't marry up <never did find out why>.

If that doesn't work - try "GRANT SELECT , INSERT ,UPDATE ON
`Asterisk`.`cdr` TO 'asteriskcdr'@'localhost';" instead.

HTH



-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Jonas
Kellens
Sent: 24 January 2011 15:44
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] Unable to insert cdr-data into mysql-DB


Hello list,

I keep on getting the error :

ERROR[1707] cdr_addon_mysql.c: Cannot connect to database server
127.0.0.1: (1045) Access denied for user 'asteriskcdr'@'localhost'
(using password: YES)


I have a 'cdr' table in my MySQL-DB. On this table the user
'asteriskcdr' has select, insert, update privileges.

GRANT SELECT , INSERT ,UPDATE ON `Asterisk`.`cdr` TO
'asteriskcdr'@'127.0.0.1';


cdr_mysql.conf :

[global]
hostname=127.0.0.1
dbname=Asterisk
table=cdr
password=mysecret
user=asteriskcdr
port=3306
sock=/tmp/mysql.sock
userfield=1

I really don't know why Asterisk cannot connect to the table..


Kind regards,
Jonas.


 If you have received this communication in error we would appreciate
you advising us either by telephone or return of e-mail. The contents
of this message, and any attachments, are the property of DataVox,
and are intended for the confidential use of the named recipient only.
If you are not the intended recipient, employee or agent responsible
for delivery of this message to the intended recipient, take note that
any dissemination, distribution or copying of this communication and
its attachments is strictly prohibited, and may be subject to civil or
criminal action for which you may be liable.
Every effort has been made to ensure that this e-mail or any attachments
are free from viruses. While the company has taken every reasonable
precaution to minimise this risk, neither company, nor the sender can
accept liability for any damage which you sustain as a result of viruses.
It is recommended that you should carry out your own virus checks
before opening any attachments. 

Registered in England. No. 27459085.





More information about the asterisk-users mailing list