CDR Call Log not working for mysql

Calls are being logged to /var/log/asterisk/cdr-csv/Master.csv and being rotated to Master.csv1 etc, however, since 25th January 2008 there are no calls being logged to mysql.
This is evidenced when I use the freepbx ‘reports’ tab and select Jan - July, only the days from installation up until 25th January exist.
I have looked at /etc/asterisk/cdr_mysql.conf and the timestamp on the file is when the logging has stopped.
This file has all options remarked out with ‘;’ see below:
;[global]
;hostname=database.host.name
;dbname=asteriskcdrdb
;table=cdr
;password=password
;user=asteriskcdruser
;port=3306
;sock=/tmp/mysql.sock
;userfield=1

I have modified this file to:
hostname=localhost
dbname=asteriskcdrdb
password=passw0rd
user=asteriskcdruser
sock=/var/lib/mysql/mysql.sock

However, it is still not logging calls to mysql.

Could someone please advise what error logs I can check and what I should look for to determine the problem?
Or even better if there is an obvious solution?
Also why an update would have changed conf files and what can be done to stop updates changing conf files in future?
Or is it that I am changing conf files from the wrong method?
(I found a similar problem with sip.conf being changed so that ‘include sip_custom.conf’ was remarked out with an update stopping incoming calls)
It was installed initially as pbxinaflash and has now been upgraded to freepbx 2.4.1.0

Finally, once this problem is resolved, is there some way to import the csv file details into the mysql database?

[update]
I have been able to get it working after finding a backup file I had of the cdr_mysql.conf file and replacing it. However, I would still like to know how to stop custom conf files from being replaced with updates and/or how to make custom entries correctly if changing the file is incorrect.
FYI, my cdr_mysql.conf file is now:
[global]
hostname=localhost
dbname=asteriskcdrdb
password = xxxxxxxxx
user = asteriskuser

Also in the logs I have found:
"loader.c: Module ‘cdr_addon_mysql.so’ was not compiled against a recent version of Asterisk and may cause instability."
Is that normal? Likely to cause problems down the track? Is there something I am doing wrong with updates to be getting this?

Thanks

Motiv8d

this is what I have in mine which is working…

[global]
hostname=localhost
dbname=asteriskcdrdb
password=amp109
user=asteriskuser
userfield=1

Yes that’s the default password I provided for you. Maybe that’s the problem you updated the password at some point and things got out of sync? Or it’s also possible that you upgraded versions of asterisk and forgot to update the asterisk addon’s which is the part that has the needed pieces for the cdr to work. So check that you have the latest asterisk-addon for the version you are running installed also.

Oh, userdfield=1 enables the userfield. That I added as we use it, the default is =0.

Hi people!

I have the same problem… HELP!!

This is my cdr_mysql.conf

[global]
hostname = localhost
dbname=asteriskcdrdb
password = martin
user = asteriskuser
userfield=1
port=3306
sock=/var/run/mysqld/mysqld.sock

Any idea??