Moved CDR database and broke CDR report, please help

I shut down MySQL, moved everything to a new directory (on the same server), updated the my.cnf file, and restarted MySQL. It worked the first time I tested it but on the second one while you can see that the database is being updated the CDR report cant seem to access it. I made sure the directory and the database had the same permissions.

Any suggestions on where to look? Is there anywhere in the GUI to point the report at the right place?

Its an older version of freepbx, 10.13.66-20

Check the ‘hostname’.err file in the /var/db/MySQL (or wherever you moved the data root to) directory. The last entry should have information about why MySQL is failing.

I see a bunch of these

190215 17:47:37 [ERROR] /usr/libexec/mysqld: Table ‘./asteriskcdrdb/cdr’ is marked as crashed and should be repaired

You have a corrupted table. It needs to be repaired as the error is indicating.

SSH into the machine, enter mysql as root switch to the asteriskcdrdb and do:

REPAIR TABLE `cdr`;

Another ignorant question: does this procedure require enough space on the disk to completely duplicate the table being repaired? Or will it just take longer if there isn’t a ton of space on the disk?

Its been running for about 40 minutes and ate up all the disk space now. I guess I didn’t have an extra 5 gb for it to use up…

The good news is that asterisk is still running fine and I can get in via SSH but the GUI is broken and its not actually writing anything to the database.

Nevermind, I just moved the 15 GB CEL table somewhere else to free up some room and the rebuild of the CDR table took a couple minutes.

My command was specifically for the cdr table, it shouldn’t have tried to do anything with the cel table.

I know but there wasn’t enough room to spare 5 GB to rebuild the CDR table, and since I’m not using CEL at the moment I just moved it to make room.

Now the CDR module works but it doesn’t seem to be adding new entries to the CDR table…

*edit: restarting fixed that right up.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.