MySQL Error: #1142 - SELECT command denied to user
You need to grant SELECT permissions to the MySQL user who is connecting to MySQL
same question as here Error: select command denied to user '<userid>'@'<ip-address>' for table '<table-name>'
see answers of the link ;)
I faced the same situation but its funny that reason for the error was due to the use of the incorrect database or schema name.
Its true that multiple issues can lead to error you have mentioned.