Why do I get "ERROR 1142 (42000): CREATE VIEW command denied to user..."
Hi,
I can't figure out why I get the following error. When creating this user?
> create user 'callagga'@'localhost' identified by 'password';
> grant all on myequity_production.* to 'callagga'@'localhost' identified by 'password' with grant option;
> create view test_view as select * from transactions;ERROR 1142 (42000): CREATE VIEW command denied to user 'callagga'@'localhost' for table 'test_view'mysql>
Any ideas why? Note below in select * from db, all the fields are "Y" (i.e. doesn't this mean this user should have all privileges for this database).
Some info:
mysql> show grants;
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Grants for callagga@localhost |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'callagga'@'localhost' IDENTIFIED BY PASSWORD '0f3d714d2e2a5422' |
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON `myequity_production`.* TO 'callagga'@'localhost' WITH GRANT OPTION |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)
mysql> select * from user where user = 'callagga';
+-----------+----------+------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+
| Host | User | Password | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Show_db_priv | Super_priv | Create_tmp_table_priv | Lock_tables_priv | Execute_priv | Repl_slave_priv | Repl_client_priv | ssl_type | ssl_cipher | x509_issuer | x509_subject | max_questions | max_updates | max_connections |
+-----------+----------+------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+
| localhost | callagga | 0f3d714d2e2a5422 | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | | | | | 0 | 0 | 0 |
+-----------+----------+------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+
1 row in set (0.00 sec)
mysql> select * from db where user = 'callagga';
+-----------+---------------------+----------+-------------+-------------+-------------+-------------+-------------+-----------+------------+-----------------+------------+------------+-----------------------+------------------+
| Host | Db | User | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Create_tmp_table_priv | Lock_tables_priv |
+-----------+---------------------+----------+-------------+-------------+-------------+-------------+-------------+-----------+------------+-----------------+------------+------------+-----------------------+------------------+
| localhost | myequity_production | callagga | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
+-----------+---------------------+----------+-------------+-------------+-------------+-------------+-------------+-----------+------------+-----------------+------------+------------+-----------------------+------------------+
1 row in set (0.00 sec)
[root@home current]# mysql --version
mysql Ver 14.12 Distrib 5.0.27, for redhat-linux-gnu (i686) using readline 5.0
Subject
Written By
Posted
Why do I get "ERROR 1142 (42000): CREATE VIEW command denied to user..."
August 31, 2008 02:00AM
September 02, 2008 08:49PM
September 02, 2008 09:02PM
September 02, 2008 09:21PM
September 03, 2008 12:27AM
September 03, 2008 12:54AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.