Database unavailable

hi all :smile:
I installed centos 6.2 32 bit and asterisk 1.8 on my system.

I installed mysql, and asterisk could connect to it by ODBC connector .
and I could save CDR in database.

but recently , I login as root user but “/var/log/asterisk/messages” show me the following warning:
[Jul 3 16:31:38] WARNING[1145] db.c: Unable to open Asterisk database ‘/var/lib/asterisk/astdb’: Permission denied
[Jul 3 16:31:38] WARNING[1145] db.c: Database unavailable

so I can’t save CDR in database

I run ls -alh in “/var/lib/asterisk” and its privilege was root.

any suggestion will be appreciated :smile:

This is probably more likely to do with the MySQL username and password that you are using. Make sure these credentials are correct.