Actually, this error happened after a power failure while working with moodlebox. The database has been crashed. Due to lack of time to do research on this issue, I re-write the SD and card and continued the work. This time I have made a change in moodlebox, changed the permission of /var/www/moodle/ directory as:
sudo chmod -R 0755 /var/www/moodle/
I tested with 2, 3 times power switch off. Now it's working fine. Thank you very much for your support.