-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Oracle MySql
PostPosted: Tue Aug 05, 2008 3:36 pm 
Beginner
Beginner

Joined: Thu Jun 12, 2008 10:48 am
Posts: 24
Hello all,

I normally use Hibernate with Oracle and connect to my db using the following:

hibernate.dialect=org.hibernate.dialect.OracleDialect

hibernate.connection.isolation=2
hibernate.max_fetch_depth=1
hibernate.show_sql=true
hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver
hibernate.connection.url=jdbc:oracle:thin:@localhost:1521:mypc
hibernate.connection.username=db
hibernate.connection.password=password

Im now using the latest MySql freeware db, so what is the MySql version of:
hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver
hibernate.connection.url=jdbc:oracle:thin:@localhost:1521:mypc

And do I need anything else?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 05, 2008 5:09 pm 
Newbie

Joined: Tue Jul 22, 2008 11:30 am
Posts: 13
I think you need to change the SQL dialect as well.

HEre is a list of ones to pick from. It looks like mysql has a few depending on your version


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 05, 2008 5:24 pm 
Expert
Expert

Joined: Wed Mar 03, 2004 6:35 am
Posts: 1240
Location: Lund, Sweden
Here is an example for MySQL:

Code:
hibernate.dialect = org.hibernate.dialect.MySQLInnoDBDialect
hibernate.connection.driver_class  = com.mysql.jdbc.Driver
hibernate.connection.url = jdbc:mysql://localhost/mydb


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.