Eclipse connect to Mysql
(The follow option is after you had installed the mysql and configure the related environment) Project->properties->Java Build Path->Libraries->Choose Add External, Choose the mysql-connector-java-5.1.13-bin.jar package my; import java.sql.*; public class MysqlJdbc{ public static void main(String args[]) { String sqlDriver = "com.mysql.jdbc.Driver"; Connection connect = null;