Menu

#131 MySql permission error prevents application creation

open
nobody
None
5
2006-09-07
2006-09-07
Todd
No

Steps to reproduce:
1. Register as new user
2. Verify account and login
3. Create a new application
-> App seems to hang but top frame gives error about
Access Denied for %user%@localhost. Here's the error:

<br />
<b>Warning</b>: mysqli::mysqli() [<a
href='function.mysqli-mysqli'>function.mysqli-
mysqli</a>]: (42000/1044): Access denied for
user 'u1157654574837'@'localhost' to
database 'app_1157654574837' in
<b>c:\webs\test\phpclick\includes\AppDatabase.inc.php</
b> on line <b>33</b><br />
<br />
<b>Warning</b>: mysqli::query() [<a
href='function.mysqli-query'>function.mysqli-
query</a>]: Couldn't fetch mysqli in
<b>c:\webs\test\phpclick\includes\AppDatabase.inc.php</
b> on line <b>63</b><br />
<br />
<b>Warning</b>: mysqli::mysqli() [<a
href='function.mysqli-mysqli'>function.mysqli-
mysqli</a>]: (42000/1044): Access denied for
user 'u1157654574837'@'localhost' to
database 'app_1157654574837' in
<b>c:\webs\test\phpclick\includes\AppDatabase.inc.php</
b> on line <b>33</b><br />
<br />
<b>Warning</b>: mysqli::query() [<a
href='function.mysqli-query'>function.mysqli-
query</a>]: Couldn't fetch mysqli in
<b>c:\webs\test\phpclick\includes\AppDatabase.inc.php</
b> on line <b>63</b><br />
<br />
<b>Warning</b>: mysqli_num_rows() expects parameter 1
to be mysqli_result, null given in
<b>c:\webs\test\phpclick\includes\AppDatabase.inc.php</
b> on line <b>450</b><br />
<br />
<b>Warning</b>: mysqli::query() [<a
href='function.mysqli-query'>function.mysqli-
query</a>]: Couldn't fetch mysqli in
<b>c:\webs\test\phpclick\includes\AppDatabase.inc.php</
b> on line <b>63</b><br />
<br />
<b>Fatal error</b>: Call to a member function
fetch_assoc() on a non-object in
<b>c:\webs\test\phpclick\includes\AppDatabase.inc.php</
b> on line <b>107</b><br />

User is created correctly in MySql but the application
is not created since the user has no permissions to
connect over localhost.

Problem is in Application.inc.php. Here is the line
causing the error:
// grant usage on *.* to u1086390132609
identified by 'password';
//$sSql = "GRANT USAGE ON *.*
TO ".$sDbUser."@localhost IDENTIFIED
BY '".$sDbPassword."'";

To remove the error, change it to:
// grant usage on *.* to u1086390132609
identified by 'password';
$sSql = "GRANT ALL ON *.* TO ".$sDbUser."
IDENTIFIED BY '".$sDbPassword."'";

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.