Depressed mysql database

xiaoxiao2021-03-06  42

I have opened N more information a few days ago, but I can't find why I can't read the information from my mysql database. It is really depressed for a while. This problem is finally solved today.

It turned out, I downloaded a JDBC MySQL driver from the Internet. When I just downloaded, I was named mysql-connector-java-3.0.15-ga-bin.zip, I opened this package, I saw it, there is a mysql driver. The program, just joined the path of this package in ClassPath, but did not expect to make me depressed N long problems. It turns out that there is a directory in this package, and then look at it, there is still a compressed package in it, named mysql-connector-java-3.0.15-ga-bin.jar. And this mysql-connection-java-3.0.15-ga-bin.jar is included in the driver we need. We should take this, then add the path to ClassPath or, re-package the program inside the ZIP package, then add the path to the classpath.

It's really a little careless, I'm suffering from N days, what is wrong? ---------------------------------------- Depressed N long servlet access database issues Finally, I just got a thorough solution.

It turns out that if you put the mysql's JDBC driver path into the classpath, your Java application is a successful access database, but your servlet is still not. You need to put the mysql's JDBC driver into your Tomcat installation directory below, restart Tomcat so your servlet can successfully access your MySQL database.

It's a problem, I spent the power of nine cows and two tigers to solve, sweat!

转载请注明原文地址:https://www.9cbs.com/read-112365.html

New Post(0)