learn java
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 The Software Craftsman this week in the Agile 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: 19958
    
  25

root != replication_user


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
 
Have you tried LearnNowOnline? http://www.learnnowonline.com/
 
subject: JDBC Fails on GRANT Command