aspose file tools*
The moose likes JDBC 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
JavaRanch » Java Forums » Databases » JDBC
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: 19697
    
  20

root != replication_user


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JDBC Fails on GRANT Command