-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: localhost converted to IP address
PostPosted: Sat Nov 23, 2013 1:20 am 
Newbie

Joined: Mon Jun 20, 2005 12:20 pm
Posts: 17
Hi all,

I am using tomcat 7.0/hibernate 3.6.8 final on mac xOS 10.8.3. My eclipse development environment stop working with the following message:

Caused by: java.sql.SQLException: null, message from server: "Host '192.168.1.104' is not allowed to connect to this MySQL server"
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1075)

Actually, my configuration uses "localhost" in spring framework:

jdbc:mysql://localhost:3306/mydb

If my computer is offline, it works fine. However, "localhost" is automatically converted to IP address if my system is connected to network. Since the database is only authenticated for "user@localhost", it will throw above exception. Any suggestion will be appreciated.

Thanks,
-ZJ


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.