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

Enrico Cicconi enrico.cicconi at rdmnet.it
Tue Jan 25 03:51:13 CST 2011


Il 24/01/2011 16:43, Jonas Kellens ha scritto:
> 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.
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>                 http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>     http://lists.digium.com/mailman/listinfo/asterisk-users
Hi, try to do as follow. (sorry for my english)

 From server console

Connect to mysql with admin privileges --> i.e. command: mysql -uroot 
-pyourpassword
change db to asterisk --> command: use asterisk;
define for your user the right password --> command: SET PASSWORD FOR 
'asteriskcdr'@'localhost' = PASSWORD('mypassword');
disconnect from mysql and reconnect with asteriskcdr user so to verify 
that user grant and access are ok. If the user configuration is ok but 
there are still problems you can now check in other direction. If not 
you solved your problem

Please let me know if I had help you.

Have a nice evening
Enrico
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110125/e6f8e330/attachment.htm>


More information about the asterisk-users mailing list