my dog learned polymorphism*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 19651
    
  18

root != replication_user


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
 
subject: JDBC Fails on GRANT Command
 
Similar Threads
Wampserver
How to prevent a MySQL slave accepting queries?
connection to Mysql with username and password
Check status of MySQL replication with JDBC
How to prevent a user from dropping tables