An error about the database connection: Communications link failure

Source: Internet
Author: User

The last packet sent successfully to the server was 0 milliseconds ago. The driver has no received any packets from the server.

It is easy to see that the database is out of the question and see if it is a path error in the Db.properties file

Db.properties in each database connection database:

SQL Server connecting to a database

Driverclassname=com.microsoft.jdbc.sqlserver.sqlserverdriver

Url=jdbc:microsoft:sqlserver://127.0.0.1:1433;databasename=mytestdb

Username=robinliu

Password=robinliu

InitialSize =2

maxactive=2

maxwait=2000

MYSQL connecting to a database

Driverclassname=com.mysql.jdbc.driver

Url=jdbc:mysql://localhost:3306/test

Username=root

Password=mysql

Initialsize=4

Maxactive =10

SQL Server 2005 connecting to a database

Driverclassname=com.microsoft.sqlserver.jdbc.sqlserverdriver

Url=jdbc:sqlserver://127.0.0.1:1433;databasename=stuinfo

Username=sa

password=1234

InitialSize =2

maxactive=100

maxwait=2000

Oracle Database connecting to a database

Database.database=oracle

Database.driverclassname = Oracle.jdbc.driver.OracleDriver

Database.password = Sinple

Database.show_sql = True

Database.url = jdbc\:oracle\:thin\: @localhost \:1521\:sinple

Database.username = Sinple

An error about the database connection: Communications link failure

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.