用户拒绝mysql_query访问

时间:2014-10-07 11:08:54

标签: android mysql json

我不知道为什么我无法连接数据库

index.php

DbFunctions.php

 {"User message":false,"error":1,"success":0,"error_msg":"Error occured in Registartion","tag":"register"}

<br />
<b>Warning</b>:  mysql_query() [<a href='function.mysql-query'>function.mysql-query</a>]: Access denied for user 'u800018303'@'10.2.1.47' (using password: NO) in <b>/home/u800018303/public_html/DbFunctions.php</b> on line <b>32</b><br />
<br />
<b>Warning</b>:  mysql_query() [<a href='function.mysql-query'>function.mysql-query</a>]: A link to the server could not be established in <b>/home/u800018303/public_html/DbFunctions.php</b> on line <b>32</b><br />
{"tag":"register","success":0,"error":1,"User message":false,"error_msg":"Error occured in Registartion"}

1 个答案:

答案 0 :(得分:0)

这可能会有所帮助:

1) 很可能你忘了调用mysql_connect(或包含调用它的脚本)。因此,对mysql_query的第一次调用是尝试使用(不完整的)自动信息登录并失败。提示是错误消息是mysql_connect通常在提供无效凭据时返回的消息,但它来自mysql_query。

2)您在两台计算机上肯定没有相同的数据库用户 - 因此您需要在应用程序配置中设置使用过的数据库用户和密码...