[英]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驱动程序( MS或jTDS ),而不是MySQL驱动程序。
Cheers, 干杯,
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.