Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/39.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Worklight,SQL适配器,指定为定义程序(';mobilefirst';@';localhost';)的用户不存在_Sql_Ibm Mobilefirst_Worklight Adapters - Fatal编程技术网

Worklight,SQL适配器,指定为定义程序(';mobilefirst';@';localhost';)的用户不存在

Worklight,SQL适配器,指定为定义程序(';mobilefirst';@';localhost';)的用户不存在,sql,ibm-mobilefirst,worklight-adapters,Sql,Ibm Mobilefirst,Worklight Adapters,我是sql和worklight的新手。我将跟随IBM Worklight,并将示例代码导入Worklight studio 在部署适配器之后,我选择RunAs->CallMobileFirstAdapter 这是我对“getAccountTransactions1”过程的回答: 这是我对“getAccountTransactions2”过程的回应: 这是过程“getAccountTransactions2”的错误控制台 FWLSE0101E:原因:[项目适配器]java.sql.SQLExcep

我是sql和worklight的新手。我将跟随IBM Worklight,并将示例代码导入Worklight studio

在部署适配器之后,我选择RunAs->CallMobileFirstAdapter

这是我对“getAccountTransactions1”过程的回答:

这是我对“getAccountTransactions2”过程的回应:

这是过程“getAccountTransactions2”的错误控制台

FWLSE0101E:原因:[项目适配器]java.sql.SQLException:指定为定义者的用户('mobilefirst'@'localhost')不存在java.lang.RuntimeException:无法使用以下过程检索数据:getAccountTransactions

我想我的sql用户“mobilefirst”@“localhost”有问题,但我不知道为什么,因为我在SQLAdapter.xml中使用了root用户

如果我将“Worklight”sql用户用作此示例代码的默认值,那么如何设置其权限

创建该过程的用户已被删除。如果 如果重新创建该用户,它将解决您的错误

您可以尝试使用:

grant all on *.* to 'root'@'%' identified by 'password' with grant option;

你提到了用户“MauliLead”,它看起来像是使用MauliLe1.1平台6.3或7(以前称为“Worklight”),但出于某种原因,你正在使用/使用来自工作灯60.0.0的示例…为什么呢

你在数据库中混入了一些东西

无论您所做的混乱的原因是什么,对您来说,最简单的解决方案就是简单地将所有权限授予两者mobilefirst@localhost用户以及Worklight@localhost.

然后,您还需要在适配器的XML文件中确保您使用的是同一个用户——“mobilefirst”或“Worklight”(来自您已授予所有权限的数据库的同一用户)

要运行精确的查询,您可以参考Stanislovas的答案——只需用适当的用户名替换“root”


不要把旧的样品和新的产品版本混在一起…

检查我的答案,如果这对你有帮助,不要忘记选择它作为正确的答案。是的,我对这些版本感到困惑。在获得所有权限之后Worklight@localhost对于6.0.0.0,它可以工作。你能告诉我为什么“结果集”是空的吗?如果我没记错的话,你应该在窗口中提供帐号。"12345".
{   "errors": [      "Runtime: Failed to retrieve data with procedure : getAccountTransactions"   ],   "info": [   ],   "isSuccessful": false,   "warnings": [   ]}
grant all on *.* to 'root'@'%' identified by 'password' with grant option;