This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Services and the fly likes ERROR 1044: Access denied for user 'username@%' to database 'db_name' Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "ERROR 1044: Access denied for user Watch "ERROR 1044: Access denied for user New topic
Author

ERROR 1044: Access denied for user 'username@%' to database 'db_name'

Astha Sharma
Ranch Hand

Joined: Oct 15, 2011
Posts: 245

Hello Ranchers

I am trying to connect my web service with the database running on server.
Following is the code.


Doing this i'm getting following exception on line 2

java.sql.SQLException: null, message from server: "Host '115.115.119.34' is not allowed to connect to this MySQL server"

To resolve this I tried runnig the command in phpMyAdmin-

"GRANT ALL PRIVILEGES ON db_name .* TO 'username'@'%' IDENTIFIED BY 'password'"

on server by the getting error-

1044: Access denied for user 'username@%' to database 'db_name'

I tried a lot but not getting any way to resolve this error. Please help me resolving this issue.
Thanks in advance for your humble replies.


Astha - OCPJP 6 (90%)
Astha Sharma
Ranch Hand

Joined: Oct 15, 2011
Posts: 245

Please answer my question if someone knows anything about it. I am waiting for replies.
Thanks in advance
 
 
subject: ERROR 1044: Access denied for user 'username@%' to database 'db_name'
 
Similar Threads
Error in opening phpMyAdmin in wampserver
Access denied error ....MySQL
Using PHP with MySql
Java MySQL connection
strange problem when accessing MySQL