cancel
Showing results for 
Search instead for 
Did you mean: 

MySQL error 1142

OldPaulie
Newbie
Posts: 2
Registered: ‎01-05-2009

MySQL error 1142

when I run my query ...
mysql> SELECT TbL_Manufacturer.Manufacturer, Tbl_Model.model, Tbl_Site.Site, Tbl_Audit.CabLoc, Tbl_Audit.serial, Tbl_Audit.name, Tbl_Audit.saID FROM hp.Tbl_Model, hp.Tbl_Audit, hp.TbL_Manufacturer, hp.Tbl_Site WHERE ( Tbl_Model.ModelID = Tbl_Audit.ModelID AND TbL_Manufacturer.ManID = Tbl_Model.ManID AND Tbl_Audit.SiteID = Tbl_Site.SiteID ) AND Tbl_Audit.ID = 553;
ERROR 1142: SELECT command denied to user 'xxxxxx'@'212.159.xx.xxx' for table 'Tbl_Model'
I thought this was a privileges problem so I deleted my mysql database and requested plusnet create me a new one, but I still get the same error.
I can run
SELECT * from Tbl_Model    ok
The query works with mysql vers 5 elsewhere so I was wondering if this was a feature of mysql vers 4 on plusnet?
Any help would be much appreciated
3 REPLIES 3
spraxyt
Superuser
Superuser
Posts: 10,063
Thanks: 1,369
Fixes: 75
Registered: ‎06-04-2007

Re: MySQL error 1142

That seems like a privileges problem.
Does doing a "GRANT ALL PRIVILEGES on Tbl_Model.* to xxxxxx@212.159.xx.xxx;" help?
David
Ben_Brown
Grafter
Posts: 2,839
Registered: ‎13-06-2007

Re: MySQL error 1142

Hi there, just a couple of questions:
Which server are you on (rumpus or humbug)?
Are you calling "USE <database>" before you're running that query? (or specifying the database on the command line). <database> should be replaced by the name of your database.
OldPaulie
Newbie
Posts: 2
Registered: ‎01-05-2009

Re: MySQL error 1142

Hi Ben,
I think you nailed it there.  My SQL statement was referencing a database that does not exist.  I have reformulated it and now the query delivers the result I expect
Many thanks
Old Paulie