执行命令被拒绝给用户“'@”localhost'对于常规错误
我在打开旧网站时遇到一些问题。我的数据表显示:
DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.
之后,我尝试调试脚本并在 mysql 中发现错误:
Error occuered during query execution:
(<small>SELECT SQL_CALC_FOUND_ROWS ID,name,remark,avrusepmonth
, CONCAT('<input type=''checkbox''id=''cb' , ID ,''' name=''check[]''
value=''',ID,''' >','<label class=''lbcb'' for=''cb',
ID,'''><=update=</label>') 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</small>):
execute command denied to user 'jeinqa'@'localhost' for routine 'TestMediaControl.monthavrage'
然后我尝试在 google 上搜索 execute command returned to user 'jeinqa'@'localhost' forroutine 'TestMediaControl.monthavrage'
有些网站说我必须做一些GRANT
:
GRANT EXECUTE ON PROCEDURE TestMediaControl.monthavrage TO 'jeinqa'@'localhost'
但我得到:
#1370 - execute command denied to user 'jeinqa'@'localhost' for routine 'TestMediaControl.monthavrage'
你能告诉我我应该怎么做才能解决这个问题?
I have 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:
Error occuered during query execution:
(<small>SELECT SQL_CALC_FOUND_ROWS ID,name,remark,avrusepmonth
, CONCAT('<input type=''checkbox''id=''cb' , ID ,''' name=''check[]''
value=''',ID,''' >','<label class=''lbcb'' for=''cb',
ID,'''><=update=</label>') 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</small>):
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
有用.....
我尝试在
root
中授予此权限。flush 权限;
It works.....
I try to grant this priviledge in
root
.root
GRANT EXECUTE ON PROCEDURE TestMediaControl.monthavrage TO 'jeinqa'@'localhost'
flush privileges;
很晚参加聚会也尝试一下组合。
并且
还尝试将 PROCEDURE 替换为 FUNCTION。
Very late to the party also try a combination of.
AND
Also try replacing PROCEDURE with FUNCTION.
几个小时前,当我执行一个存储过程时,我在 phpMyAdmin 中遇到了这个问题,我认为该存储过程会被检测为语法错误。
我在字段名称和计算字段之间缺少逗号,这给了我相同的错误消息。
I have encountered this in phpMyAdmin, a few hours ago, when executing a stored procedure with what I thought would be detected as a syntax error.
I was missing a comma between a field name, and a calculated field, and this gave me the same error message.
当我尝试在查询中使用 MIN 函数时,我遇到了同样的错误。
MySQL 不喜欢在 MIN 和开头 ( 之前看到空格。
在阅读上面的内容并尝试使用 MIN(..) 而不是 MIN (..) 后,我的查询成功了。
想想看。
I got the same error when trying to use the MIN function in my query.
MySQL didn't like seeing a space before MIN and the opening (.
After reading the above and trying MIN(..) instead of MIN (..) my query worked.
Go figure.
我也遇到了问题 - 我的错误是引用例程计数 - 访问被拒绝。
问题是我有“count (case when...)”并且 count 和 ( 之间不能有空格。删除空格修复了错误。
I had the problem too - my error was quoting was with routine count - access denied.
The problem was I had "count (case when...)" and there cannot be a space between count and (. removing spaces fixed the error.
我昨天遇到了这个问题,我预计会出现语法错误,但显示了此消息。
我的错误:我写了“SELECT m.id, m.MAX(id_number) as id_number...”而不是“SELECT m.id, MAX(m.id_number) as id_number...”...错误是与最大。错误消息没有太大帮助。
I encountered this yesterday, I expected a syntax error but this message was shown.
My mistake: I wrote "SELECT m.id, m.MAX(id_number) as id_number..." instead of "SELECT m.id, MAX(m.id_number) as id_number...".... the error is with the MAX. The error message wasn't too helpful.
参加聚会已经很晚了。我也犯了一个语法错误并得到了同样的错误。我在 MAX 函数 - MAX (ABC) 之间使用了一个空格。删除空格 MAX(ABC) 后就可以工作了。
Very very late to the party. I also committed a syntax mistake and got the same error. I used a space between my MAX function - MAX (ABC). Got it working after removing the space MAX(ABC).