The Artima Developer Community
Sponsored Link

Java Answers Forum
Java and Hibernate

1 reply on 1 page. Most recent reply: Jan 11, 2010 1:04 AM by Kondwani Mkandawire

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Rajeev Mutalik

Posts: 57
Nickname: rajmutalik
Registered: Sep, 2002

Java and Hibernate Posted: Jan 10, 2010 11:36 PM
Reply to this message Reply
Advertisement
Hi,

I am trying to connect to a database in linux from my windows Java application/program. In hibernate.cfg.xml I have given userid as <property name="hibernate.connection.username"> root</property>.

But while connecting its taking the userid as root@10.10.1.2 where 10.10.1.2 is my local windows machine ip address. How do I prevent @ip_addr from getting appended to my actual username.

I am getting the following error message:
Caused by: java.sql.SQLException: Access denied for user 'root'@'10.10.1.2' (using password: YES)

Thanks and Regards,
Rajeev


Kondwani Mkandawire

Posts: 530
Nickname: spike
Registered: Aug, 2004

Re: Java and Hibernate Posted: Jan 11, 2010 1:04 AM
Reply to this message Reply
> Hi,
>
> I am trying to connect to a database in linux from my
> windows Java application/program. In hibernate.cfg.xml I
> have given userid as <property
> name="hibernate.connection.username"> root</property>.
>
> But while connecting its taking the userid as
> root@10.10.1.2 where 10.10.1.2 is my local windows machine
> ip address. How do I prevent @ip_addr from getting
> appended to my actual username.
>
> I am getting the following error message:
> Caused by: java.sql.SQLException: Access denied for user
> 'root'@'10.10.1.2' (using password: YES)
>
> Thanks and Regards,
> Rajeev

I doubt the problem is with your @.

What Database are you using? Have you given the root User access to your database? By default I know that Ubuntu does not give root access to a created database - there are a bunch of commands you need to run. I don't quite remember how Mandrake works, and I have not used other Linux distros.

In short your problem either lies with your OS permissions to your DB or DB permissions (permission granting is different for Postgres & MySQL for instance).

Flat View: This topic has 1 reply on 1 page
Topic: Eclipse SVN Error Previous Topic   Next Topic Topic: Plz, help me some exercises

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use