File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and Relational Databases and the fly likes JDBC Fails on GRANT Command Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "JDBC Fails on GRANT Command" Watch "JDBC Fails on GRANT Command" New topic
Author

JDBC Fails on GRANT Command

Crisp Antony
Greenhorn

Joined: Apr 03, 2013
Posts: 1
Following command from mysql command prompt works fine but doesn't works from JDBC

grant replication slave on *.* to 'replication_user'@'%' identified by 'password';


mysql> grant replication slave on *.* to 'replication_user'@'%' identified by 'password';
Query OK, 0 rows affected (0.03 sec)


JDBC returns Exception as below
"Access denied for user 'root'@'%' (using password: YES)"


Platform Linux
JDK Version 1.7

any help will be appreciated
Thanks
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 20050
    
  30

root != replication_user


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
 
wood burning stoves
 
subject: JDBC Fails on GRANT Command
 
It's not a secret anymore!