Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java MySQL connection

 
Thomas Greene
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to connect java application with mysql.
Earlier mysql was installed on a remote machine and the connection was working fine. But now i was testing it by installing it on the local machine. So changed the host name from name of server to localhost and specified user name and password for local mysql database.
But now i can't conenct to the local databse.
i am getting the following Error

Access denied to user abc@127.0.0.1 (Using password:YES).

But i can directly run the database from prompt.

Please Help
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thomas,
Do you have a firewall on your local machine? Maybe it is blocking the port Mysql is using?
 
Julian Kennedy
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had a problem like this the first time I used MySQL, but it was a couple of years ago and I can't remember the exact cause. Here are my suggestions:
  • Try 127.0.0.1 instead of localhost to bypass the DNS lookup
  • You may need to set stuff like SocketPermission and something else in the policy file of your app server


  • I'm afraid that's all I can remember.

    Jules
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic