<property name="connection.driver_class"> 
            com.mysql.jdbc.Driver
</property> 
<property name="connection.url"> 
           jdbc:mysql://localhost:3306/hibernate_test?useUnicode=true&amp;characterEncoding=utf-8
</property> 
<property name="dialect"> 
          org.hibernate.dialect.MySQLDialect
</property> 

解决方案 »

  1.   

     <property name="connection.driver_class"> 
                com.mysql.jdbc.Driver         
    </property> 
    <property name="connection.url"> 
       jdbc:mysql://localhost:3306/yourDB
    </property><property name="dialect"> 
              dialect.MysqlDialect 
    </property> 
      

  2.   

            <property name="show_sql">true </property>
            <property name="connection.driver_class">
                com.mysql.jdbc.Driver 
            </property>
            <property name="connection.url">
                jdbc:mysql://localhost:3306/yourdatebase
            </property>
            <property name="connection.username">root </property>
            <property name="connection.password">root </property>
            <property name="dialect">
              org.hibernate.dialect.MySQLInnoDBDialect
            </property> 
      

  3.   

    你可以自己去看看hibernate的参考文档<?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE hibernate-configuration PUBLIC
              "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
              "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"><!-- Generated by MyEclipse Hibernate Tools.                   -->
    <hibernate-configuration>    <session-factory>
            <property name="connection.username">root</property>
            <property name="connection.url">jdbc:mysql://localhost:3306/petstore</property>
            <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
            <property name="myeclipse.connection.profile">MySQLDB</property>
            <property name="connection.password">root</property>
            <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
            <property name="hibernate.show_sql">true</property>
         <property name="hibernate.hbm2ddl.auto">upadate</property>
        </session-factory>
    </hibernate-configuration>