WebOct 19, 2024 · You can't create a view in a read only database (at least at RDS), so I attempted to create a user in the production database that can only create views. However, attempting to create a view gives this error: create view v_test as select * from tabItem; ERROR 1142 (42000): ANY command denied to user 'test_view'@'%' for table 'tabItem' Webcreate schema myschema authorization ApplicationUser GO grant create view to ApplicationUser GO To do this you need to either change the authorization of the schema, which may have other consequences, or use something like a database DDL trigger. For an existing schema do: alter authorization on schema::myschema to ApplicationUser
#1142 MySql Error - CREATE VIEW command denied to user
WebJul 11, 2024 · Taken from the MySQL docs SHOW PRIVILEGES shows the list of system privileges that the MySQL server supports. The exact list of privileges depends on the version of your server. What you're seeing in that output is just a list of available privileges. Not the ones that user has. To identify your privileges, you must run SHOW GRANTS WebNov 2, 2013 · set @st = 'CREATE OR REPLACE VIEW users_view as SELECT * FROM users'; PREPARE stmt FROM @st; EXECUTE stmt; ERROR 1142 (42000) at line 1: ANY command denied to user 'MY_USER'@'%' for table '/tmp/#sql_446b_0' My grants are: GRANT ALL PRIVILEGES ON `MY_DB`.* TO 'MY_USER'@'%' Everything works fine … bithinforin insecticide
Bug #17900 CREATE VIEW command denied to user ... on …
WebDec 13, 2011 · What I found is that if you exported databases from MySQL <= 5.1 via mysqldump ... --all-databases and then imported that into your MySQL >= 5.5, your users will have been replaced (of course), but your root will have the same problem as OP. And mysql_upgrade won't work - you have to add --force flag, i.e. mysql_upgrade -u root -p - … WebDec 22, 2016 · MySQL - Impossible to use REFERENCES on mysql 5.7 (but was working on 5.0) I am trying to add foreign keys to tables in a database. Let's consider the following minimal example: CREATE DATABASE db_foo; USE db_foo; CREATE TABLE a (b VARCHAR (3) PRIMARY KEY); CREATE TABLE c (d VARCHAR (3), KEY c_ix (d)); … bithiophenedithiol