0

I was doing my project on jelastic I have used glassfish server and mySQL when I tried running it I get this error "java.sql.SQLException: Access denied for user 'root'@'192.168.3.33' (using password: YES)" the thing is mySQL node info is showing it is connected using the IP should be "192.168.3.32" can anybody help me plz

2016-08-22T07:04:31.839186Z 55 [Note] Access denied for user 'root'@'192.168.3.33' (using password: YES)

I have granted all the privileges to the root user but still something is wrong

Virtuozzo
  • 1,993
  • 1
  • 10
  • 13
Anil Tiwari
  • 7
  • 1
  • 3

1 Answers1

1

When you create an environment with Glassfish + MySQL, it means, that Glassfish and MySQL are separate servers with different IP. In your case:

192.168.3.32 - MySQL server's IP. (database server) 192.168.3.33 - GlassFish server's IP. (application server)

As we see, from your output, you are trying to connect from application server to application server. This is wrong, because 192.168.3.33 - is an IP of glassfish, not MySQL. For proper connection, you should to use an IP 192.168.3.32 as IP of your DB.

More details about Java server connection to MySQL you cand find at our documentation page.

Virtuozzo
  • 1,993
  • 1
  • 10
  • 13