用户拒绝更新命令 [英] update command is denied for user

查看:83
本文介绍了用户拒绝更新命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用这个免费托管网站进行开发和测试.

I've been using this free hosting site for development and testing.

即使应该允许用户使用cPanel中的所有命令,我也无法使用UPDATE MySQL命令更改数据库值.

I couldn't use an UPDATE MySQL command to change the database values, even though the user is supposed to be allowed to use all commands from cPanel.

然后,我已经对默认用户进行了相同的测试,但仍然无法正常工作.但是,它可以在我的系统上正常工作.

Then, I've tested the same with a default user, it still won't work. However, it works fine on my system.

MySQL错误为

UPDATE command denied to user 'test'@'localhost' for table 'content'

其他命令运行正常.

为什么会这样?以及如何预防呢?或对此有任何解决方案?

Why is this happening? And how can it be prevented? Or any solution for this?

我非常确定用户具有使用UPDATE命令的权限,因为我可以与同一用户一起使用phpMyAdmin并修改MySQL字段.

And I am very sure that users have permission to use the UPDATE command because I can use phpMyAdmin with the same user and modify the MySQL fields.

我不明白为什么对于拥有全部特权并且可以通过phpMyAdmin进行所有操作的用户,拒绝了PHP的一些MySQL命令.有了该脚本,phpMyAdmin和SQL主机位于同一服务器上.

I don't understand why some MySQL commands from PHP are denied for a user who was given all priviliges and can do everything via phpMyAdmin. Given that script, phpMyAdmin and the SQL host are on the same server.

推荐答案

对于在这里尝试回答此问题的每个人,我表示由衷的感谢.我找到了问题和解决方法.

For everyone who have tried answering this question here is my sincere thanks. I have found the problem and solution.

我的sql查询就是这样

my sql query is like this

UPDATE `dblayer`.`test` SET `title` = 'hello a' WHERE `test`.`id` =1;

我从phpmyadmin获得的

,它在我的系统上运行良好. 但是当我在服务器上工作时它不起作用,它说命令被拒绝可能是因为

which I got from phpmyadmin and it works perfectly on my system. But when I work on the servers it doesn't work and it says command denied may be because

`dblayer`.`test`

我正在尝试全局选择表格(或类似的方式,我不确定) 但是如果我的sql查询是

I am trying to select the table globally (or something like that, I'm not sure) but if my sql query is

UPDATE `test` SET `title` = 'hello a' WHERE `test`.`id` =1;

它也可以在我的服务器上工作.

it works on my server too.

这篇关于用户拒绝更新命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆