Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SELECT command denied to user 'web215-crm'@'10.0.29.64' for table 'parentinventory'

Posted on 2014-09-14
8
Medium Priority
?
60 Views
Last Modified: 2015-09-19
Hi,

I am getting the following error with a SELECT statement on a shared hosting server.

SELECT command denied to user 'web215-crm'@'10.0.29.64' for table 'parentinventory'

It was working but not sure what has changed to affect it now or if it is on the hosting server end.
0
Comment
Question by:thinklings
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 2
8 Comments
 
LVL 24

Expert Comment

by:mankowitz
ID: 40321982
I don't know how much of the database you really have access to. MySQL provides table and command level access prohibitions. Can you get to a MySQL console? If so, you are ultimately going to want to issue a command like this

GRANT SELECT  ON `parentinventory` to `web215-crm`@`10.0.29.64`

However, I suspect you won't have the GRANT privilege, and you will probably have to talk to your hosting company about that.
0
 

Author Comment

by:thinklings
ID: 40321988
Thanks, I have contacted my hosting provider to see if there is anything they can sort out on their end.
0
 

Author Comment

by:thinklings
ID: 40322265
I got the following response from my hosting provider -

Thank you for your patience, we had a closer look at this. The issue isn't to do with permissions, currently database web215-crm has the following permissions:
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON `web215-crm`.* TO 'web215-crm'@'%' WITH GRANT OPTION

Select is in there as you can see, it could in relation to a script issue. It could to do with authentication is handled in your code when query is run for the user?
0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 

Author Comment

by:thinklings
ID: 40322266
How do I check if authentication is handled within my code?
0
 

Author Comment

by:thinklings
ID: 40322267
This is an example of a query that I am running -

SQLString = "SELECT idCompanies FROM `web215-crm`.Companies WHERE trim(CompanyName) = '" & Trim(ASPxComboBoxCompany.Text) & "'"

Open in new window


And this is the connection string I am using -

<connectionStrings>
    <add name="CJG" connectionString="User Id=web215-crm;server=79.170.44.215;Persist Security Info=True;database=web215-crm;pwd=XXXXXXX;convert zero datetime=True" providerName="MySql.Data.MySqlClient" />
  </connectionStrings>

Open in new window

0
 
LVL 24

Expert Comment

by:mankowitz
ID: 40322815
Sometimes, you can get that error if you reference a table that doesn't exist or if you inadvertently connect to the wrong server. Can you confirm that
1. The server is 79.170.44.215
2. There is a table "Companies" in schema web215-crm

try replacing your select statement with something very basic to see if it works.

SQLString = "SELECT idCompanies FROM `web215-crm`.Companies WHERE 1"

Also, as a note for later, be very careful of including user input in an SQL query. You should either escape ASPxComboBoxCompany.Text or use a parameterized query.
0
 

Accepted Solution

by:
thinklings earned 0 total points
ID: 40322897
Thanks mankowitz.. All references were correct so I just rebuilt the software with the same code and all is working now. Not sure what the problem was or what was fixed but it is operating now.

Thanks again for your help.
0
 

Author Closing Comment

by:thinklings
ID: 40984552
No proper solution here. Just worked after a rebuild.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question