Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am a newbie to MySQL, being more accustomed to MSSQL. However, we have recently purchased the LabTech management software, which uses a MySQL back end. While writing a custom report to keep track of the status of the network, I added a new view. The new view works just fine when executed as root, but when running it as a user I get:

Error Code: 1142 SELECT command denied to user 'username'@'remote_address' for table 'new_view'

I am using MySQL Workbench to administer the database and I cannot see anywhere to view the permissions of the view. I have tried

GRANT SELECT ON labtech.new_view TO 'username'@'localhost'; flush privileges;

but that has not helped. What am I missing?

share|improve this question
3  
Did you mean 'username'@'remote_address' in that GRANT command? 'localhost' and 'remote_address' are different users to mysql. –  DerfK Oct 29 '10 at 22:19
    
That was it. I didn't realize that MySQL considers the host as well as the username. Thanks! If you add that as an answer I'll credit you –  rotard Nov 1 '10 at 15:53
    
But now I can't seem to access anything ELSE in the database as that user –  rotard Nov 1 '10 at 16:13
    
what does SHOW GRANTS FOR 'username'@'remote_address' tell you? –  RateControl Aug 18 '11 at 15:43

1 Answer 1

Make sure that you recognize that mysql recognizes the address as part of the username.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.