[英]I want to connect between Java app and Xampp
Enter code here: 在这里输入代码:
private static final String CONNECTION_PATH = "jdbc:mysql://localhost:3306/parking";
The problem lies in the connection path and the URL of parking database. 问题出在停车数据库的连接路径和URL 。
If you are using maven, put 如果您正在使用Maven,请放
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>6.0.6</version>
</dependency>
into your pom and you should be ready to go. 进入您的pom,您应该准备好了。
If you are not using maven, grab the jar file from http://central.maven.org/maven2/mysql/mysql-connector-java/6.0.6/mysql-connector-java-6.0.6.jar and add it to your classpath. 如果您不使用Maven,请从http://central.maven.org/maven2/mysql/mysql-connector-java/6.0.6/mysql-connector-java-6.0.6.jar抓取jar文件并将其添加到你的classpath。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.