pbxinaflash

PBX in a Flash Installation, Setup & SIP Trunk Configuration

How to fix MySQL error 127 for freePBX users

How to fix MySQL error 127 for freePBX users

Some end-users may experience a VERY generic DB ERROR when using Recordings or VoiceMail via web interface. This is due to a corrupt database because of permission changes or power outages.  Here is a quick way to fix.
You will need to know the name of the database and table that is being effected.
When checking the MySQL log (/var/log/mysql.log ) you may see something like :

~Error 127 for ./asteriskcdrdb/cdr ( or something similar)

Solution:
  • log into server
  • run command : mysql -u root ( assuming no password was set)
    • If password was set, use mysql -u root -p and enter your password
  • type SHOW DATABASES; to make sure you can see the DB's ( notice the semicolon)



mysql> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| asterisk           |
| asteriskcdrdb      |
| mysql              |
| test               |
+--------------------+
  
  • then type REPAIR TABLE asteriskcdrdb.cdr;
It make take a few minutes, depending on the CDR page
the results would come up where the last line of "OK", then exit

***Repairing the database might remove entries, so backing up would be ideal***

 

SIMPLE DID
Starting at only:

$9.99/month*
Plus taxes & fees

Includes 1 USA local number & 2 lines
Upgrade anytime.

Add Intl Numbers - $4.99 each/mo.
 


30-Day Money-Back Guarantee

 

ContactUs