An example of Linux Java MySQL

xiaoxiao2021-03-06  111

When you install JDK and MySQL, you need JDBC to join MySQL. This time you need to download mysql-connector-java. The current version is MySQL-Connector-Java-3.1.4-Beta, you can download it at www.mysql.com. Downloaded for mysql-connector-java-3.1.4-beta.tar.gz, you can decompressed to any directory, then write vi .Bash_profile to add classpath = $ ClassPath: Current mysql-connection: Java's directory / mysql-connector-java-3.1.4-beta.jar, add ClassPath after adding, add ClassPath. Private string sdblocation = "JDBC: mysql: //127.0.0.1: mysql: //127.0.0.1: mysql: //127.0.0.1: mysql: //127.0.0.1: MySQL: //127.0.0.1: 3306 / meNagerie "; Statement Stmt = null; ResultSet RS = null; private string sdbdriver =" com.mysql.jdbc.driver ";

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

New Post(0)