by Howard Miller.
The two most like problems..
1. Your database isn't running
2. The database settings you have told Moodle are wrong.
Make sure the DB is actually working and carefully check your hostname/username/password. Is the GRANT command you gave correct? Have you allowed the host you are connecting from?