Access problem to remote CDR MariaDB database

Hello,

i followed these instructions:

Remote CDR Database Installation Guide

and I can see the old connection records.

New connections are not displayed. I see the following error message in the log:

[2026-03-18 22:58:44] WARNING[1918]: res_odbc.c:534 ast_odbc_print_errors: SQL Execute returned an error: HY000: [ma-3.1.15][12.0.2-MariaDB-deb11-log]The user specified as a definer ('freepbxuser'@'localhost') does not exist
[2026-03-18 22:58:44] WARNING[1918]: res_odbc.c:429 ast_odbc_prepare_and_execute: SQL Execute error -1!
[2026-03-18 22:58:44] WARNING[1918]: cdr_adaptive_odbc.c:766 odbc_log: cdr_adaptive_odbc: Insert failed on 'asteriskcdrdb:cdr'.  CDR failed: INSERT INTO cdr (calldate, clid, src, dst, dcontext, channel, dstchannel, lastapp, lastdata, duration, billsec, disposition, amaflags, uniqueid, cnum, cnam, outbound_cnum, linkedid, sequence) VALUES ({ ts '2026-03-18 21:58:38' }, '"" <021##9008##>', '021##9008##', '0800333####', 'from-internal', 'PJSIP/10-00000000', 'PJSIP/telekom_021##9008##-00000001', 'Dial', 'PJSIP/+49800333####@telekom_021##9008##,300,Ttrb(func-apply-sipheaders^s^1,(1))', 5, 3, 'ANSWERED', 3, '1773871118.0', '10', 'Wohnzimmer', '021##9008##', '1773871118.0', 0)

Why is the database server being searched for locally even though I configured the database host in the FreePBX web interface under Settings => Advanced Settings => Remote CDR Database?

See Attachment.

root@freepbx:~# isql  -v MySQL-asteriskcdrdb
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| echo [string]                         |
| quit                                  |
|                                       |
+---------------------------------------+

Can you give me any further advice?

Regards, Stefan Harbich

It’s a shame no one can give me a tip?

Instructions are for CentOS and you seem to be on Debian. Could it be an issues?

I don’t think it’s due to the CentOS instructions. The question is simply why is the database being searched for at ‘freepbxuser’@‘localhost’? Where does this entry come from? I’ve searched for the file contents and haven’t found them.

I just noticed that the current connections to the remote database server are only recorded in the cel table. They are not recorded in the cdr, queuelog, and transient_cdr tables.

When I stopped and started FreePBX instead of restarting it, it worked.