SQL error prevents FreePBX web page loading

Hi All
I had to reboot the machine and now when attempting to get to the front end I get a lot of code onscreen. Main window shows PDOException (HY000)
SQLSTATE[HY000]: General error: 1036 Table ‘ampusers’ is read only.

How can I fix this?
Screenshot added.


Things have just got worse!
Now getting


SQLSTATE[HY000] [2002] Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)

SQLSTATE[HY000] [2002] Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)

Trace Back

/var/www/html/admin/libraries/BMO/Database.class.php:80 PDO->__construct()
[0]: mysql:host=localhost;dbname=asterisk;charset=utf8
[1]: freepbxuser
[2]: Lb75Clelu1aV

/var/www/html/admin/libraries/BMO/FreePBX.class.php:69 FreePBX\Database->__construct()

/var/www/html/admin/bootstrap.php:141 FreePBX->__construct()

/etc/freepbx.conf:9 require_once()
[0]: /var/www/html/admin/bootstrap.php

/var/www/html/admin/config.php:103 include_once()
[0]: /etc/freepbx.con


Is this the distro or something else?

With the SQL it’s trying to execute the most plausible explanation is that something/someone (you?) messed up the permissions in /var/lib/mysql…

They should be mysql:mysql as far as I know…

The easy way to reestablish permissions with FreePBX is usually “fwconsole chown” but I don’t know if it take care of the database permissions, my guess would be that it doesn’t so you would have to issue the “chown” yourself…

Good luck and have a nice day!


Hi, This is the distro.
I will take a look at the permissions, but could do with an explicit guide to changing these as I am a Linux ignoramus!

Problem is, its stopped being a read only table issue and now mysql service won’t start at all. It doesn’t even produce a log.