|
|
Re: Java and Hibernate
|
Posted: Jan 11, 2010 1:04 AM
|
|
> 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).
|
|