Home  >  Article  >  Database  >  How does JDBC connect to MySQL database?

How does JDBC connect to MySQL database?

黄舟
黄舟Original
2017-08-01 15:51:422229browse

We all use MySQL database now, and we must learn the steps of JDBC to connect to the database.

1. Open eclipse, create a project first, you can not write the content first, right-click the project and select "properties"

How does JDBC connect to MySQL database?

How does JDBC connect to MySQL database?

#2. Select "libraries" and select "add external jars" on the right. It depends on where you put the jar package before. It is usually placed under lib under JDK. Select it.

How does JDBC connect to MySQL database?

How does JDBC connect to MySQL database?

How does JDBC connect to MySQL database?

How does JDBC connect to MySQL database?

#3. In this way, the library you just selected will be added.

How does JDBC connect to MySQL database?

4. Then click OK, so there will be more jar packages under your project.

How does JDBC connect to MySQL database?

##Notes

You must import the jar package to connect To MySQL



The above is the detailed content of How does JDBC connect to MySQL database?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn