DB Error: installing CDR Reports 2.10.0.6

Using Module Admin I try to update CDR Reports to version 2.10.0.6 got the DB Error: unknown Error, so I’ve uninstalled
than install got the same error:
“CDR Reports 2.10.0.6 will be installed and enabled
Please wait while module actions are performed
Checking if field did is present in cdr table…
Adding did field to cdr
This might take a while…
DB Error: unknown error”

Every thing else is up to date.
I wonder if I can try the installation using CLI.

Thank you

By the way, I’m on 1.812.210.58-1 PBX Firmware.

Hi Sidnei,

I had the same problem - the reason being was that the CDR table didn’t exist so the update that was trying to add a ‘did’ column to the cdr table failed (I found this in freepbx logs).

  1. Checking /etc/asterisk/cdr_mysql.conf I found a reference to table it’s expecting to see. Mine has dbname=asteriskcdrdb which didn’t exist.

  2. I created the asteriskcdrdb table via SQL that I had from feepbx source … namely /usr/src/freepbx-2.10.0/SQL/cdr_mysql_table.sql .

mysql -u asteriskuser -p asteriskcdrdb < SQL/cdr_mysql_table.sql

  1. Grant access to the asteriskuser, etc as specified in the config file also

grant all privileges on asteriskcdrdb.* to asteriskuser@localhost ;

Once done the update worked.

HTHs.

Cheers,
Alan

Hi,
I tried to follow your solution but I’ve got the Error message, please review
[root@localhost SQL]# mysql -u freepbx -p asteriskcdrdb
Enter password:
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)
[root@localhost SQL]# mysql -u asteriskuser -p asteriskcdrdb
Enter password:
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)
[root@localhost SQL]#
[root@localhost SQL]# [root@localhost SQL]# mysql -u freepbx -p asteriskcdrdb
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)

That would indicate that mysql server is not running on the local machine.