Go to CPanel, then click MySQL databases, then click on the username of the database that you used with the MySQL Query, then check 'All Privileges' at the top of the table and then click 'Make Changes'. Then, go back to your website and see if you get that error.
Thank You