Unable to connect OpenShift mysql db using java code even after creating different users in users table -
i trying connect mysql created in "openshift" platform through java code.
my connect establishment like,
con = drivermanager.getconnection("jdbc:mysql://127.3.175.2:3306/sivam", "root", "root");
i getting below error while running code,
java.sql.sqlexception: access denied user 'root'@'localhost' (using password: yes)
i did below step after googling,
create user 'root'@'%' identified '***'; grant privileges on * . * 'root'@'%' identified '***' grant option max_queries_per_hour 0 max_connections_per_hour 0 max_updates_per_hour 0 max_user_connections 0 ; grant privileges on `root\_%` . * 'root'@'%';
but still getting same error.
also don't know why ip address '127.3.175.2:3306' replaced 'localhost' in error message. may duplicate question searched , tried nothing worked out me.
Comments
Post a Comment