Hello
Hello heartofachanpion,
As Error is showing may be because user that you have in wp-config.php file has not permission to access your database So Can you please check the in server MySQL database whether the database has the user assigned or not which you are using in config file.If not assign user to database and there details in wp-config.php file.Please follow below link will guide you where you need to add those user and database details:
https://codex.wordpress.org/Editing_wp-config.php
Thanks
I guess its server problem. Actually the server I am working on is Chinese.
Also the website works fine most of times. This error comes randomly at any time. So I think wp-config has all the permission to read my database.