java+mysql+hibernate环境搭建所需的下载地址

MySQL:  http://www.mysql.com/

MySQL JDBC驱动: http://dev.mysql.com/downloads/connector/j/5.0.html

MySQL-Front : http://www.mysqlfront.de/

Hebernate: http://www.hibernate.org/

Hebernate相关工具: http://sourceforge.net/projects/hibernatesynch/

 

另外,转载一篇在eclipse中连接mysql的文章:

eclipse中数据库连接mysql配置:

 1. 下载 mysql-connector-java-5.0.3

     地址:http://www.mysql.org/get/Downloads/Connector-J

  2.下载解压后将其中的压缩包:mysql-connector-java-5.0.3-bin.jar 拷贝的项目的Libraries.

          具 体步骤如下:

            先将压缩包拷贝到项目的目录下, 再在Projece Explorer中选择你要的配置项目,点右键选择 properties->Java Build Path -> Libraries ->Add JARs 这样就ok了,下面是一个连接的例子,引用别人的。但我验证过了没问题的:

       import java.sql.*;

      public class DataBaseCont{

            public static void main(String[] args){

                 try{

                 Connection conn; Statement stmt; ResultSet res;

                Class.forName("com.mysql.jdbc.Driver").newInstance();

                 conn = DriverManager.getConnection( "jdbc:mysql://localhost:3306/test",  

                                                                                 root","");        

                  stmt = conn.createStatement();

                  res = stnt.excuteQuery("select * from contact");

                  while(res.next()){ String name = res.getString("name");

                System.out.println(name); } res.close();

                 } catch(Exception ex){

                    System.out.println("ERRo:" + ex.toString()); 

                  }

               }

           }

  注意:不要将com.mysql.jdbc.Driver import到你的类中,因为它已经在你的Libaries了。

你可能感兴趣的:(java+mysql+hibernate环境搭建所需的下载地址)