Mysql Error 1370
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 mysql grant execute on all procedures of this site About Us Learn more about Stack Overflow the company mysql stored procedure permissions Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges mysql stored procedure definer Ask Question x Dismiss 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: mysql execute privilege Sign up Mysql: execute command denied to user ''@'localhost' for routine error up vote 8 down vote favorite 1 i got some problem during open my old website. My dataTable show: DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error. After that, I tried to debug my script and found error in mysql:
Illegal Grant/revoke Command; Please Consult The Manual To See Which Privileges Can Be Used
Error occuered during query execution: (SELECT SQL_CALC_FOUND_ROWS ID,name,remark,avrusepmonth , CONCAT('','') as checkb ,monthavrage(ID,12) as latestavr , moq, leadtime FROM test_media WHERE nowuse=1 and monthavrage(ID,12) > 0 ORDER BY name desc, ID LIMIT 0, 10): execute command denied to user 'jeinqa'@'localhost' for routine 'TestMediaControl.monthavrage' Then I tried to googling for execute command denied to user 'jeinqa'@'localhost' for routine 'TestMediaControl.monthavrage' and some sites said that I must do some GRANT: GRANT EXECUTE ON PROCEDURE TestMediaControl.monthavrage TO 'jeinqa'@'localhost' but I got: #1370 - execute command denied to user 'jeinqa'@'localhost' for routine 'TestMediaControl.monthavrage' could you tell me how should I do for solving this? mysql mysql-error-1064 privileges grant share|improve this question edited Sep 10 '11 at 6:37 asked Jun 22 '11 at 3:26 nunu 69221638 1 You don't have enough privileges on jeinqa user, log in with a user which has full privileges to grant these privileges to user jeinqa. –Shef Sep 10 '11 at 7:02 add a comment| 2 Answers 2 active oldest votes up vote 16 down vote accepted It works..... I try to grant this
Updates: Status: No Feedback Impact on me: None Category:MySQL Server: Command-line
User Does Not Have Access To Metadata Required To Determine Stored Procedure Parameter Types
Clients Severity:S2 (Serious) Version:5.5.16 x86_64 OS:Linux (Ubuntu 11.04 x86_64) Assigned grant execute on procedure to: Tags: Backup, mysqldump View Add Comment Files Developer Edit Submission View Progress Log Contributions mysql show procedures [2 Oct 2011 12:27] Van Stokes Description: Getting the following error while trying to backup a database with mysqldump using user 'backup' having 'read-only' http://stackoverflow.com/questions/6434573/mysql-execute-command-denied-to-user-localhost-for-routine-error privs. mysqldump execution stops and the database is NOT dumped. This statement: /usr/bin/mysqldump --host=localhost --user=backup --password=HiddenPassword --databases origin --result-file=Origin.sql --opt --compress Yields the following output: mysqldump: Couldn't execute 'SHOW FIELDS FROM `bookmark_view`': execute command denied to user 'backup'@'localhost' for routine 'origins.OwnerGetTypeByName' (1370) For this user: SHOW GRANTS FOR https://bugs.mysql.com/bug.php?id=62598 'backup'@'localhost'; GRANT SELECT, SHOW DATABASES, LOCK TABLES, SHOW VIEW, EVENT ON *.* TO 'backup'@'localhost' IDENTIFIED BY PASSWORD 'xxx' $ mysqld --version mysqld Ver 5.5.16-log for Linux on x86_64 (MySQL Community Server (GPL)) $ mysqldump --version mysqldump Ver 10.13 Distrib 5.5.16, for Linux (x86_64) $ mysql --version mysql Ver 14.14 Distrib 5.5.16, for Linux (x86_64) using readline 5.1 How to repeat: Attempt to backup a database having views and routines with the grants above. Suggested fix: Not sure. I think it's an internal permission error. If I execute the mysqldump with a user having root like permissions I do NOT get the error. [13 Nov 2011 18:02] Valerii Kravchuk Based on the error message: mysqldump: Couldn't execute 'SHOW FIELDS FROM `bookmark_view`': execute command denied to user 'backup'@'localhost' for routine 'origins.OwnerGetTypeByName' (1370) your view is defined so that it refers to the stored function your ba
Binkowski Email Updates: Status: Duplicate Impact on me: None Category:MySQL Server: Security: Privileges Severity:S2 (Serious) Version:5.1.41-3ubuntu12.7 OS:Linux (Linux 2.6.32-33-server #70-Ubuntu SMP Thu https://bugs.mysql.com/bug.php?id=62291 Jul 7 22:28:30 UTC 2011 x86_64 GNU/Linux) Assigned to: Tags: execute, privilege, stored procedure View Add Comment Files Developer Edit Submission View Progress Log Contributions [29 Aug 2011 10:45] https://www.daniweb.com/programming/databases/threads/143001/access-denied-executing-routines Steve Binkowski Description: MySQL is not applying the EXECUTE permission as directed. Please see code demonstration below. How to repeat: #> mysql -u admin -p Enter password: Welcome to stored procedure the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 228 Server version: 5.1.41-3ubuntu12.7 (Ubuntu) Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> use MyDB; Database changed mysql> delimiter // mysql> CREATE DEFINER = 'admin'@'%' PROCEDURE `spFetchSiteConfig`( -> IN siteurl vARCHAR(255) -> ) -> NOT DETERMINISTIC -> CONTAINS grant execute on SQL -> SQL SECURITY DEFINER -> COMMENT '' -> BEGIN -> SET @t_SQL = CONCAT( -> 'SELECT c.hostname as url,a.configname,b.configvalue FROM ', -> '(ConfigOptions a LEFT JOIN SiteConfigs b ON a.id=b.configid) INNER JOIN ', -> 'Sites c on c.hostname=\'',siteurl,'\''); -> PREPARE t_stmt FROM @t_SQL; -> EXECUTE t_stmt; -> END; -> // Query OK, 0 rows affected (0.00 sec) mysql> delimiter ; mysql> grant usage on *.* to MyDBreader@localhost identified by 'a-really-long-password'; Query OK, 0 rows affected (0.00 sec) mysql> grant execute on procedure MyDB.spFetchSiteConfig to MyDBreader@localhost; Query OK, 0 rows affected (0.00 sec) mysql> call spFetchSiteConfig(''); Empty set (0.00 sec) Query OK, 0 rows affected (0.00 sec) mysql> exit Bye #> mysql -u MyDBreader -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 228 Server version: 5.1.41-3ubuntu12.7 (Ubuntu) Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> call MyDB.spFetchSiteConfig(''); ERROR 1370 (42000): execute command denied to user 'MyDBreader'@'localhost' for routine 'MyDB.spFetchSiteConfig' mysql> show grants for MyDBreader@localhost; +-----------------------------------------------
my gymnastics group. I've got some background on both programming, mysql and PHP, mainly from university classes. However, all the projects where done in localhost, and now that I'm getting in the "real world" I'm having a few problems... The two main problems right now are: 1. The "public" user isn't accepted... and it seems I lack the privileges to GRANT anything to public user. Any ideas why? 2. I've been developing the site on localhost and all was ready to go. When I uploaded the files and started testing the routines in a reserved area for members, it started giving the following error: Error 1370 : execute command denied to user 'airfapt_clusher'@'localhost' for routine 'airfapt_airfa.inserir_noticia'. I've read a few thing about a "definer" field, but couldn't understand how to use it... The code for the routine is: create procedure airfapt_airfa.inserir_noticia(in modalidade char(20), in corpo text, in data_n date) begin start transaction; insert into airfapt_airfa.noticias(data_n, modalidade, corpo) values(data_n, modalidade, corpo); commit; end && I hope you guys can help me out... Thanks in advance! Carlos mysql clusher 4 posts since Aug 2008 Newbie Member 3Contributors 8Replies 9Views 8 YearsDiscussion Span 6 Years Ago Last Post by webhostuk 0 dickersonka 104 8 Years Ago The problem is your "public" user most likely does not have permissions to call the insert stored procedures. A lot of times, you may have a separate user for searching or selecting data, than inserting data. 0 Discussion Starter clusher 8 Years Ago The problem is your "public" user most likely does not have permissions to call the insert stored procedures. But these are two separate problems. When I call the procedure in the example I do it with a registered and full privileged user (airfapt_clusher), that's why I'm not getting the problem. The "public" user problem I solved it using registered users with different privileges, just like you said. 0 dickersonka 104 8 Years Ago So what problem are you getting now? 0 Discussion Starter clusher 8 Years Ago Like I said, when I try to execute a routine (a procedure or function) the er