Hello.

Why you're using -tcpAllowOthers? Do you really need to connect to your 
testing system from other hosts? Combination of this setting 
with -ifNotExists effectively creates a remote security hole on your 
system, -ifNotExists should not be normally used even for local 
connections, local security hole is not as critical as remote one, but it 
could be exploited in some cases anyway.

Actually you should start a separate Java process with the following code:

// Create a local database
DriverManager.getConnection("jdbc:h2:mem:H2-db;DB_CLOSE_DELAY=-1", "user", 
"password").close();
// Create the TCP Server
org.h2.tools.Server server = org.h2.tools.Server.createTcpServer("-tcpPort", 
"9128");
server.start();

If you need to use -tcpAllowOthers, specify a strong password in this 
connection.

Other processes must use a remote URL instead 
(jdbc:h2:tcp://localhost:9128/mem:H2-db).

Another option is to start the H2 Server process and create a database in 
it with H2 Console or from context menu of its tray icon.

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/cdde92a1-336d-467a-b0c9-443ee0fd65b9o%40googlegroups.com.

Reply via email to