The error SELECT command denied to user ‘user’@’host’ is often caused when the currently connected MySQL User does not have a SELECT grant to the targeted Database. This could be easily fixed on a Shared Hosting plan or VPS hosting or Dedicated Server hosting:
FIX: MySQL – SELECT Command Denied To User
Depending on the hosting plan you use, you can follow the guidelines and fix this issue in less than a minute.
1. Login to your cPanel and click on the MySQL® Databases tool which is located under the Databases section
2. Add the user you wish to grant with SELECT privileges to the database in question and make sure to provide the user with All Privileges.
VPS / Dedicated Server without WHM / cPanel:
Login via SSH as the root user and type the following:
mysql GRANT SELECT ON database_name.* TO 'user'@'localhost';