H2 the various connection methods of embedded database

Source: Internet
Author: User

H2database is an open source database written in the Java language, typically used as a data store for games, and of course Web projects are available, and Web projects can use the database

To install the H2 database first

http://www.h2database.com/

Configure the link and load drivers to the Jdbc.properties file

First connection via TCP/IP server

Jdbc.driverclassname=org.h2.driver jdbc.url=jdbc\:h2\:tcp\://server address \:9092/~/database name; Mvcc\=true

Jdbc.username=sa

jdbc.password=

The second way to connect an embedded local connection

Jdbc.driverclassname=org.h2.driver
Jdbc.url=jdbc:h2:~/localh2database; Mvcc\=true
Jdbc.username=sa
jdbc.password=

Description: When mvcc\=true can allow multiple users to connect to H2 database at the same time, the default user name is null for the SA password

It is recommended to use Dbeaver to manage the H2 database

embeded new embedded to local database connection

Server New Remote Connection database

This is embeded.

This is server mode.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.