Re: Wrong user name or password on AUTO_SERVER

583 views
Skip to first unread message

Thomas Mueller

unread,
Jul 5, 2012, 1:39:57 PM7/5/12
to h2-da...@googlegroups.com
Hi,

If the database says wrong user name or password then most likely this is the problem. If you get the same error after deleting the database, then I guess you deleted the wrong database...

What could help analyzing the problem is using an absolute path:

jdbc:h2:/data/h2/test;AUTO_SERVER=TRUE;MODE=MySQL

Regards,
Thomas


On Tuesday, July 3, 2012, Art wrote:
Currently, my jdbc url is: jdbc:h2:~/test;AUTO_SERVER=TRUE;MODE=MySQL
Here are the settings I am using:
      <property name="javax.persistence.jdbc.driver_class" value="org.h2.jdbcDriver"/>
      <property name="javax.persistence.jdbc.username" value="sa"/>
      <property name="javax.persistence.jdbc.password" value=""/>
      <property name="javax.persistence.jdbc.url" value="jdbc:h2:~/test;AUTO_SERVER=TRUE;MODE=MySQL"/>

I can start my app and its DB functions are fine.  I have my

I want to connect to the same DB from another JDBC client (Netbeans DB browser)
I'm using the same URL and user/password, but I get "Wrong user name or password [28000-164]"
I've tried deleting the DB files and starting over, but no luck.
Any ideas?
(forgive the formatting, this is an old version of firefox on this pc)


--
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To view this discussion on the web visit https://groups.google.com/d/msg/h2-database/-/KrtQp4RL3RwJ.
To post to this group, send email to h2-da...@googlegroups.com.
To unsubscribe from this group, send email to h2-database...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.

Art

unread,
Jul 9, 2012, 3:03:07 PM7/9/12
to h2-da...@googlegroups.com
Thomas,
Thanks  for the reply.

I created a new DB with a well-defined file location.  I saw the new DB files were created.
As before, the DBUnit/JPA program can connect to the DB, populate it and query it.
But even after that program disconnects, neither the H2 client nor a NetBeans DB Client can connect to that same DB.

However, the NetBeans DB client CAN connect to a similarly named H2 DB as long as the DBUnit/JPA client has never touched it.

I tried deleting the lock file, but that didn't help.




Thomas Mueller

unread,
Jul 9, 2012, 3:33:40 PM7/9/12
to h2-da...@googlegroups.com
Hi,

If there is a .lock.db file, then the database is still open. Don't
delete the .lock.db file.

Regards,
Thomas
Reply all
Reply to author
Forward
0 new messages