User1 has the following global privileges:-

Create, Reload, File, Alter, Lock Tables and Create Temporary Tables

And has total control to the appropriate database.

When I run:-

CREATE TEMPORARY TABLE mclcjv 
        (SELECT u.RangeDayID, u.UserGID, MAX(d.RangeDate) AS
UserLastRangeUse 
        FROM Steel_RangeUse u JOIN Steel_RangeDay d ON u.RangeDayID =
d.RangeRecordID 
        WHERE u.RangeUseDeleted=0 AND u.RangeUseNo=0 GROUP BY
u.UserGID);

I get the message:-

(16 row(s) affected)

However if I run:- 

SELECT * FROM mclcjv;

It fails with the message:-

Error Code : 1142
SELECT command denied to user: 'us...@......' for table 'mclcjv'

If I try the first SQL again I get:-

Error Code : 1050
Table 'mclcjv' already exists

However it work fine for the root user of the MySQL installation. What
permissions are missing?

Charlie

Reply via email to