Trouble creating a MySQL 5 view

Trouble creating a MySQL 5 view

am 05.01.2007 18:00:23 von laredotornado

Hi,

As root, I logged in to MySQL client and ran this command

GRANT ALL PRIVILEGES ON *.* to 'myuser'@'localhost' identified by
'mypassword';

Then I logged in as "myuser", selecting my database, and then tried to
create a view for a table that already exists:

CREATE VIEW SUMMARY_DAILY_SALES_TOTALS AS SELECT * FROM
SUMMARY_DAILY_TOTALS;

and got the error:

ERROR 1142 (42000): CREATE VIEW command denied to user
'myuser'@'localhost' for table 'SUMMARY_DAILY_SALES_TOTALS'

How can I resolve this error and create my view?

Thanks, - Dave

Re: Trouble creating a MySQL 5 view

am 05.01.2007 18:57:23 von zac.carey

laredotornado@gmail.com wrote:

> Hi,
>
> As root, I logged in to MySQL client and ran this command
>
> GRANT ALL PRIVILEGES ON *.* to 'myuser'@'localhost' identified by
> 'mypassword';
>
> Then I logged in as "myuser", selecting my database, and then tried to
> create a view for a table that already exists:
>
> CREATE VIEW SUMMARY_DAILY_SALES_TOTALS AS SELECT * FROM
> SUMMARY_DAILY_TOTALS;
>
> and got the error:
>
> ERROR 1142 (42000): CREATE VIEW command denied to user
> 'myuser'@'localhost' for table 'SUMMARY_DAILY_SALES_TOTALS'
>
> How can I resolve this error and create my view?
>
> Thanks, - Dave

I had a similar problem today. I don't know what went wrong but simply
restarting seemed to solve the problem - so maybe give that a go.