In order to connect to MySQL, you need to prepare a JDBC driver that supports MySQL. It is provided by the MySQL website.
You can download it from the URL below. http://dev.mysql.com/downloads/connector/
When you access the above URL, you will find a link called "Connector / J". Clicking this will take you to the Download Connector / J page. Follow the steps below to download the JDBC driver that supports MySQL.
Select Platform: Platform Independent. The download will start. Downloaded files are usually saved in the download folder on Windows. Open Windows Explorer (Windows button + E button). Open the download folder. Make sure that the following files are saved: mysql-connector-java-x.x.xx.zip
Right-click on mysql-connector-java-x.x.xx.zip. Select "7-Zip-> Extract to mysql-connector-java-x.x.xx ".
When mysql-connector-java-x.x.xx.zip is unzipped, a mysql-connector-java-x.x.xx folder is created. Open the mysql-connector-java-x.x.xx folder. Make sure you have "mysql-connector-java-x.x.xx-bin.jar".
The following are the above remarks.
If the extension (zip) is not displayed, make the following settings. Select Start Button-> Control Panel Display method: Select a large icon with Select a folder option Select the View tab Uncheck "Hide registered extensions" Press the OK button
If 7-Zip (compression / decompression software) is not displayed, it is highly likely that you will continue to use it, so please install it here and make the following settings. Install 7-Zip Open a web browser Search for "7-Zip". Or open https://sevenzip.osdn.jp Click the 64-bit x64 download link After downloading, execute the saved file to start the installation Complete installation
Jar file
A jar (Java Archive) file is a collection of class files and configuration files into a single file, or a tool for outputting this jar file. The jar file is created in ZIP format, which not only reduces the file size, but Java can handle the jar file directly, so you can expect to reduce the server load and improve the startup speed.
Java-database connection / Java-MySQL connection ① Overview of JDBC and JDBC driver (2) JDBC driver acquisition method (for MySQL) and data connection preparation ③-1 How to set CLASSPATH in environment variable ③-2 How to set CLASSPATH to Eclipse build bus ④ Load JDBC driver ⑤ Connect to database (MySQL) to search table information and display search results
Recommended Posts