Hi,
I don't know, if you checked: You can connect to mysql server - by
default - only from local host. You have to change some setting:
- in the my.cnf file (the server main config file) comment out the
line: bind-address: 127.0.0.1
- create user, how has right's on the schema (not only from
localhost): GRANT SELECT, INSERT, UPDATE, DELETE ON schema.*
TO 'user'@'%' IDENTIFIED BY 'password';
% means the user can connect from all hosts.
> Hi, I want to develop a custom Java Desktop Database Application using Netbeans 6.1. If the database is running locally, the application works, but if i move the database on another PC the application no longer works. The only change which I did it was in persistence.xml:
>
>
> Code:
> <property name="toplink.jdbc.url" value="jdbc:mysql://localhost:3306/piese"/>
>
> changed with
>
>
> Code:
> <property name="toplink.jdbc.url" value="jdbc:mysql://192.168.0.1:3306/piese"/>
>
>
>
> User name and password are the same on both Mysql servers.
>
> I tried to debug the application to find any error, but there is no error. The application runs but stops at this line:
>
>
> Code:
> entityManager = java.beans.Beans.isDesignTime() ? null : javax.persistence.Persistence.createEntityManagerFactory("piesePU").createEntityManager();
>
>
>
>
>
>
>
> I have all rights in mysql. I can connect from Netbean's window Services to the database and make changes on it.
>
>
>
> Java Desktop Database Application does not work unless the database is on a local server?
>
>
>
>
>