Date: 2020/1/16
Function: IDEA realize the connection jdbc
IDE:Intellij IDEA
With mysql, for example,
Step One: Download mysql driver jar package
Official website address: https://dev.mysql.com/downloads/j/
Step Two: Import jar package in the project, attention: imported must be decompressed jar package, can not import the archive file can not be found will be displayed
- After compression I import the file into your project
- Right Project - New Folder libs- jar package will be copied into the folder
- Click modules, on the right +, click out JARS or directories, is introduced into the jar file, click ok to
4. Establish jdbc statement:
establishing driven
to establish connection object
to establish the statement object
obtained return header
process the result