Mysql Error Number 1356
Contents |
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 About Us
Mysql Error 1356 Mysqldump
Learn more about Stack Overflow the company Business Learn more about hiring developers mysqldump definer/invoker of view lack rights to use them (1356) or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack
Invalid Table(s) Or Column(s) Or Function(s) Or Definer/invoker Of View Lack Rights To Use Them
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 What is error mysql (#1356)? up vote error 1356 (hy000) view 1 down vote favorite I create a view: CREATE OR REPLACE VIEW AuthorizationTrainer AS SELECT Person.id, Person.login as nick, Person.password as pass FROM TABLE2,Person WHERE TABLE2.id_Person = Person.id Then create grants: GRANT SELECT ON Teachprog.AuthorizationTrainer TO 'Trener'@'%' SELECT id,nick FROM AuthorizationTrainer - works SELECT id,nick,pass FROM AuthorizationTrainer - produces the error: fly error: #1356 - View 'Teachprog.AuthorizationTrainer' references invalid table(s) or column(s) or function(s) or definer/invoker of mysqldump: couldn't execute 'show fields from view lack rights to use them sql mysql grant share|improve this question edited Dec 28 '10 at 15:32 outis 49.2k889142 asked Dec 26 '10 at 9:55 Mediator 4,6331874138 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote Have you checked the grants on the underlying TABLE2 and Person tables? You can grant all the select permissions you want on the view, but if the user is blocked from accessing the pass field in Person, you'll get this error. To check: show grants for trener@% share|improve this answer answered Dec 26 '10 at 10:41 Marc B 273k24233352 Person and Table2 have permission to select –Mediator Dec 26 '10 at 11:03 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 sql mysql grant or ask your own question. asked 5 years ago viewed 4039 times active
moment and relax. Sometimes people run across an error and become flustered andfrustrated. Take a deep breath and relax. Sometimes "Madness is like gravity. All that needs is a little
Mysqldump Force
push" and "Sometimes the questions are complicated and the answers are simple." What is all this about? Well for example I recently was asked to help solve a problem that was troubling another DBA. Nothing meant in disrespect at all to that DBA but being in a rush people just overlook theanswerthat is in front of them andinsteadspiraldown intomadness. Here is the general concept of the situation. http://stackoverflow.com/questions/4533413/what-is-error-mysql-1356 After doing a mysqldump of a database the user moved it to another database for others to being testing. The import worked just fine. However, the users began to see errors when they tried to query from a prebuilt view. mysql> select * from
Community Podcasts MySQL.com Downloads Documentation Section Menu: MySQL Forums :: Knowledge Base :: error code 1356 - invalid http://forums.mysql.com/read.php?143,177732,177732 table/view New Topic Advanced Search error code 1356 - invalid https://bugs.mysql.com/bug.php?id=69678 table/view Posted by: BN Vo () Date: October 15, 2007 11:06AM hi, I have a problem to open and/or describe table. The errors I had are mysql_stgssl>desc ATL1_USER_DETAILS_VW; ERROR 1356 (HY000): View 'atl1.ATL1_USER_DETAILS_VW' references invalid table(s) or column(s) or function(s) or mysql error definer/invoker of view lack rights to use them mysql_stgssl>select * from ATL1_USER_DETAILS_VW; ERROR 1356 (HY000): View 'atl1.ATL1_USER_DETAILS_VW' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them mysql_stgssl> How can see who own the table? Can someone show me how to pull the data dictionaries definer/invoker of view chart for MySQL??? I used to select table_name, owner from dba_tables in Oracle but I don't know how to do it in MySQL Thanks, bvo Navigate:Previous Message•Next Message Options:Reply•Quote Subject Views Written By Posted error code 1356 - invalid table/view 19560 BN Vo 10/15/2007 11:06AM Re: error code 1356 - invalid table/view 9096 Ryan Lowe 12/23/2007 12:04AM Sorry, you can't reply to this topic. It has been closed. powered by phorum 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. Contact Sales USA: +1-866-221-0634 Canada: +1-866-221-0634 Germany: +49 89 143 01280 France: +33 1 57 60 83 57 Italy: +39 02 249 59 120 UK: +44 207 553 8447 Japan: 0120-065556 China: 10800-811-0823 India: 0008001005870 More Countries» Contact Us Online» Products MySQL Enterprise Edition MySQL Standar
2013 15:19 Reporter: David Coyle Email Updates: Status: Closed Impact on me: None Category:MySQL Server: Optimizer Severity:S3 (Non-critical) Version:5.6.12 OS:Mac OS X (10.8.4) Assigned to: View Add Comment Files Developer Edit Submission View Progress Log Contributions [5 Jul 2013 14:23] David Coyle Description: It is not possible to query a VIEW with an ORDER BY clause that references an ALIAS in the SELECT clause of the VIEW definition unless all columns in the view are requested, see "How to repeat". This affects MySQL Server 5.6.10 and 5.6.12 running on Mac OS X 10.8.4 installed via HomeBrew. The steps in "How to Repeat" show the most basic way to recreate the bug when directly querying a view this bug becomes more of an issue when the view is part of a join and there are matching column names on both sides of the join and SELECT * would result in ambiguous columns. The first workaround is to order by the real column name rather than the alias. If the alias is an expression e.g. (a.my_apples/b.total_apples) AS avg_apples Then the ORDER BY clause in the view has to use the expression rather than the ALIAS e.g. ORDER BY (a.my_apples/b.total_apples) in order to work. This is fine for simple queries but for complex expressions this duplication of code is a maintenance headache because it may not be immediately obvious and breaks DRY principles. How to repeat: #This works fine SELECT