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.