# Kotlin ORM Examples with MySQL and Gradle

**URL:** <https://discuss.kotlinlang.org/t/kotlin-orm-examples-with-mysql-and-gradle/101>\
**Category:** Uncategorized\
**Created:** [September 20, 2015, 8:46pm UTC](https://discuss.kotlinlang.org/t/kotlin-orm-examples-with-mysql-and-gradle/101 "2015-09-20T20:46:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkawakami](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/bkawakami/32/1473_2.png) [@bkawakami](https://discuss.kotlinlang.org/u/bkawakami)\
**Post date:** [September 20, 2015, 8:46pm UTC](https://discuss.kotlinlang.org/t/kotlin-orm-examples-with-mysql-and-gradle/101/1 "2015-09-20T20:46:39Z")

</div>

Hello guys.

I’m new with Kotlin and I’m still learning.

I tried start understanding how my pure application Kotlin could connect to a local MySQL, but I can’t understand…

Already programmed in other languages, such as PHP and there are many ORM’s that facilitate the way.

I tried use many ORM’s and it’s very confusing, I nothing what I tried worked

I’ve tried with Ebean and OrmLite, but I feel that no one has fully complete documentation.

In my project in Kotlin I use Gradle to configure the dependencies.

Does anyone have any examples of how Kotlin with Gradle would connect with a local MySQL with or without ORM’s?

I thank you all 🙂

---

<div class="post-metadata">

**Author:** ![mplatvoet](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/mplatvoet/32/7121_2.png) [@mplatvoet](https://discuss.kotlinlang.org/u/mplatvoet)\
**Post date:** [September 21, 2015, 6:06am UTC](https://discuss.kotlinlang.org/t/kotlin-orm-examples-with-mysql-and-gradle/101/2 "2015-09-21T06:06:52Z")

</div>

There are a couple of good examples on GitHub to get you started, for instance[this one](https://github.com/kotlin-projects/kotlin-samples-for-spring) is up to date and uses Spring and Hibernate. It only lacks a buid tool. Are you already a bit cconfortable in the language itself, because that really helps.

---

<div class="post-metadata">

**Author:** ![vincentlauvlwj](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/vincentlauvlwj/32/6439_2.png) [@vincentlauvlwj](https://discuss.kotlinlang.org/u/vincentlauvlwj)\
**Post date:** [November 26, 2019, 2:56pm UTC](https://discuss.kotlinlang.org/t/kotlin-orm-examples-with-mysql-and-gradle/101/3 "2019-11-26T14:56:22Z")

</div>

Maybe you can try Ktorm. There are some examples on its website, [https://ktorm.liuwj.me](https://ktorm.liuwj.me)

An example project integrating Ktorm with Spring Boot: [vincentlauvlwj/ktorm-example-spring-boot](https://github.com/vincentlauvlwj/ktorm-example-spring-boot)
