简体   繁体   English

ping连接测试中失败的错误(om.mysql.jdbc.exceptions.jdbc4.CommunicationsException:通信链接失败)

[英]ping failed error in connection testing(om.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure)

I'm trying to connect to a MySQL database using hibernate. 我正在尝试使用休眠连接到MySQL数据库。

I'm testing the connection using this : 我正在测试使用此连接:

在此处输入图片说明

From the image supplied in comments, I can see that you're running an MS SQLServer, and you're trying to connect using a MySQL JDBC URL. 从注释中提供的图像中,我可以看到您正在运行MS SQLServer,并且正在尝试使用MySQL JDBC URL进行连接。

Instead, your JDBC URL should be of the form (see this link for further info) 相反,您的JDBC URL应该采用以下格式(有关更多信息,请参见此链接

jdbc:sqlserver://localhost;databaseName=test

And of course you need the SQL Server drivers ( MS or jTDS ), instead of the MySQL drivers. 当然,您需要SQL Server驱动程序( MSjTDS ),而不是MySQL驱动程序。

Cheers, 干杯,

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 AWS RDS连接数据库错误:com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:通信链接失败 - AWS RDS connection database error : com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:通信链接失败 - com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:通信链接失败? - com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure? 出现错误com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:通信链接失败 - Getting Error com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure 错误:com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:通信链接失败 - Error : com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:通信链接失败和BeanEntityManager错误 - com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure AND BeanEntityManager error com.mysql.cj.jdbc.exceptions.CommunicationsException:通信链接失败 - com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure MySQL:间歇性com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:通信链接失败 - MySQL: Intermittant com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:通信链接失败 - 由:java.net.UnknownHostException:null:未知错误 - com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure - Caused by: java.net.UnknownHostException: null: unknown error eclipe:间歇性com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:通信链接失败 - eclipe: Intermittent com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM