#vi /home/user/public_html/wp-config.php

check the DB_name ,DB_user etc…
since the error occured due to the failure in giving privilage from DB_NAME to DB_USER , use the below instruction.
#mysql
> GRANT ALL PRIVILEGES ON DB_NAME.* TO DB_USER@localhost IDENTIFIED BY ‘DB_PASSWORD’;