Mysql Create View Error 1142
Contents |
Pelzer Email Updates: Status: Verified Impact on me: None Category:MySQL Server: Security: Privileges Severity:S3 (Non-critical) Version:5.0.3-alpha-debug OS:Linux (SuSE 9.1) Assigned to: Assigned Account Triage: Triaged: D3 (Medium) View Add Comment Files Developer Edit Submission View Progress Log
Create Command Denied To User For Table
Contributions [8 Mar 2005 0:25] Trudy Pelzer Description: The CREATE VIEW privilege cannot be #1142 - create command denied to user granted unless the view for which the privilege is granted already exists. But since there can only be one table/view with the
Mysql References Command Denied To User
same name, this means that a user who is granted the CREATE VIEW privilege can never create the view regardless. This is different behaviour from the CREATE privilege, which can be granted for a table that doesn't select command denied to user ''@'localhost' for table 'user' mysql already exist, thus allowing the grantee to make use of the privilege. Note1: Ideally, the CREATE and CREATE VIEW privileges should not be object privileges at all -- they should be system privileges and the ON clause should not accept any table name. Note2: This is related to Bug#7091, which was written up based on a false understanding of how the CREATE VIEW privilege should work. How to repeat: -- sign on as root mysql trigger command denied to user mysql> select current_user; +----------------+ | current_user | +----------------+ | root@localhost | +----------------+ 1 row in set (0.01 sec) mysql> select * from t; ERROR 1146 (42S02): Table 'tp.t' doesn't exist mysql> grant create on t to me; Query OK, 0 rows affected (0.03 sec) -- GRANT CREATE works even though table t does not exist -- sign on as me mysql> select current_user; +--------------+ | current_user | +--------------+ | me@% | +--------------+ 1 row in set (0.00 sec) mysql> use tp; Database changed mysql> create table t (col1 int); Query OK, 0 rows affected (0.01 sec) -- This is the correct response; me can create the table t. mysql> create table t1 (col1 int); ERROR 1142 (42000): CREATE command denied to user 'me'@'localhost' for table 't1' -- This is the correct response; me hasn't been granted the privilege to create a table called t1. -- sign on as root mysql> select current_user; +----------------+ | current_user | +----------------+ | root@localhost | +----------------+ 1 row in set (0.00 sec) mysql> select * from v; ERROR 1146 (42S02): Table 'tp.v' doesn't exist mysql> grant create view on v to me; ERROR 1146 (42S02): Table 'tp.v' doesn't exist -- This differs from the CREATE [TABLE] implementation. Although I can GRANT CREATE for a table that doesn't already exist, I cannot GRANT CREATE VIEW
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site
Mysql Error 1142
About Us Learn more about Stack Overflow the company Business Learn more about create command denied to user phpmyadmin hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss
Drop Command Denied To User Mysql
Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up CREATE command denied to https://bugs.mysql.com/bug.php?id=9034 user? up vote 9 down vote favorite 1 show grants for charm@'localhost'; ---------------------+ | Grants for charm@localhost | +-----------------------------------------------------------------------------------------------------------------+ | GRANT USAGE ON *.* TO 'charm'@'localhost' IDENTIFIED BY PASSWORD '*EDD1CD76B1331E363B2BAED3F0B7EAF28559FBEWD' | | GRANT ALL PRIVILEGES ON `charmstyle_com`.`charmstyle_com` TO 'charm'@'localhost' i used grant all on charmstyle_com to charm@'localhost' IDENTIFIED BY 't1q4gytrur'; flush privileges; then i import the database,it shows an error: ERROR 1142 (42000) at line http://stackoverflow.com/questions/9887364/create-command-denied-to-user 29: CREATE command denied to user 'charm'@'localhost' for table 'adminnotification_inbox' mysql share|improve this question asked Mar 27 '12 at 10:04 37336792 881311 add a comment| 1 Answer 1 active oldest votes up vote 14 down vote accepted You granted the user permissions only to the 'charmstyle_com' table inside the 'charmstyle_com' database. What you probably want is to grant permissions to all the tables in 'charmstyle_com' (or at least the 'adminnotification_inbox' table) GRANT ALL PRIVILEGES ON `charmstyle_com`.* TO 'charm'@'localhost' alternatively GRANT ALL PRIVILEGES ON `charmstyle_com`.`adminnotification_inbox` TO 'charm'@'localhost' share|improve this answer answered Mar 27 '12 at 10:09 scibuff 7,96211620 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email 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 mysql or ask your own question. asked 4 years ago viewed 22413 times active 4 years ago Linked 0 How to user rails performance tests with real data Related 13my
here for a quick overview of the site Help Center Detailed answers to any questions http://stackoverflow.com/questions/6047812/mysql-grant-permissions-denied-for-create you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is command denied a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up MySQL: grant permissions denied for CREATE up vote 2 down vote favorite 1 I setup a database & user along with grant permissions how I normally do and I'm still getting access command denied to denied and I'm not sure why: [root@server23 redditonrails]# mysql -u redditonrails -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 431954 Server version: 5.0.45 Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> use redditonrails_development; Database changed mysql> create table test; ERROR 1142 (42000): CREATE command denied to user 'redditonrails'@'localhost' for table 'test' mysql> show grants; +------------------------------------------------------------------------------------------------+ | Grants for redditonrails@localhost | +------------------------------------------------------------------------------------------------+ | GRANT USAGE ON *.* TO 'redditonrails'@'localhost' IDENTIFIED BY PASSWORD '*******' | | GRANT ALL PRIVILEGES ON `redditonrails_test`.`localhost` TO 'redditonrails'@'localhost' | | GRANT ALL PRIVILEGES ON `redditonrails_development`.`localhost` TO 'redditonrails'@'localhost' | | GRANT ALL PRIVILEGES ON `redditonrails`.`localhost` TO 'redditonrails'@'localhost' | +------------------------------------------------------------------------------------------------+ 4 rows in set (0.00 sec) mysql> SELECT USER(),CURRENT_USER(); +-------------------------+-------------------------+ | USER() | CURRENT_USER() | +-------------------------+-------------------------+ | redditonrails@localhost | redditonrails@localhost | +-------------------------+-------------------------+ 1 row in set (0.00 sec) mysql mysql-error-1142 share|improve this question edited Jun 29 '11 at