The difference between connecting SQL Server and MySQL in a MAVEN project

Source: Internet
Author: User
Tags mysql in

In a MAVEN project, the packages required to load for SQL and MySQL connections are not the same as those in jdbc.properties

For MySQL:

Jdbc.properties's wording:

Jdbc.driverclassname=--  mysql driver jdbc.url=jdbc\:mysql\://localhost\: 3306 /Workloads?useunicode=true&characterencoding=utf-8   --  specific database information and set encoding jdbc.username= user name Jdbc.password= Password

For SQL:

Need to add Jtds rack package in maven

<dependency>      <groupId>net.sourceforge.jtds</groupId>      <artifactid>jtds</ artifactid>      <version>1.2.4</version>    </dependency>

Jdbc.properties's wording:

Jdbc.driverclassname=net.sourceforge.jtds.jdbc.Driver  -- database driver jdbc.url= Jdbc:jtds:sqlserver://localhost:1433/Shopping  -- data specific information jdbc.username= user name Jdbc.password= password

Drive and database specific information cannot be written like this:

-- Jdbc.driverclassname=com.microsoft.sqlserver.jdbc.sqlserverdriver -- jdbc.url=jdbc:sqlserver://localhost:1433;databasename=shopping

The difference between connecting SQL Server and MySQL in a MAVEN project

Related Article

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.