代码之家  ›  专栏  ›  技术社区  ›  yali

mysql 10.1.21-mariadb的方言类叫什么?

  •  1
  • yali  · 技术社区  · 8 年前

    我在用马里亚布方言课

    <hibernate-configuration>
    <session-factory>
        <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
        <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/Book</property>
        <property name="hibernate.connection.username">root</property>
        <property name="hibernate.connection.password"></property>
        <property name="hibernate.connection.pool_size">1</property>
        <property name="hibernate.current_session_context_class">thread</property>
        <property name="hibernate.show_sql">true</property>
        <property name="hibernate.dialect">org.hibernate.dialect.MariaDBDialect</property>
    
        <mapping class="com.yazeed.brain.dto.User" />
    </session-factory>
    

    Exception in thread "main" org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
    Caused by: org.hibernate.exception.SQLGrammarException: Error calling Driver#connect 
    Caused by: java.sql.SQLSyntaxErrorException: Unknown database 'book'
    
    2 回复  |  直到 8 年前
        1
  •  0
  •   Gaurav Shakya    8 年前

        2
  •  0
  •   Brajesh    8 年前

    org.hibernate.dialect.MariaDB53Dialect org.hibernate.dialect.MariaDBDialect