Database driver for MariaDB

364 views
Skip to first unread message

Mario Foerster

unread,
Jun 19, 2014, 2:18:56 AM6/19/14
to scala...@googlegroups.com
Is it possible to use the MySQL slick driver to connect to a MariaDB database? If yes, how to do this?

Mario Foerster

unread,
Jun 19, 2014, 5:59:45 AM6/19/14
to scala...@googlegroups.com
I already tried to use the Slick JdbcDriver in conjunction with the maria db driver. This results into an SQLSyntaxErrorException for "create table" ...

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"X" ("X_ID" INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1)' at line 1


Stefan Zeiger

unread,
Jun 19, 2014, 8:44:22 AM6/19/14
to scala...@googlegroups.com
Slick's MySQLDriver should work with MariaDB in general. You connect in exactly the same way by using the MySQL JDBC driver. However, the last time I tried it there was one failing test (AFAIR a sub-comprehension wasn't fused which causes MariaDB to lose the ordering whereas MySQL preserved it). I haven't investigated that case any further yet.


On 2014-06-19 11:59, Mario Foerster wrote:
I already tried to use the Slick JdbcDriver in conjunction with the maria db driver. This results into an SQLSyntaxErrorException for "create table" ...

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"X" ("X_ID" INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1)' at line 1


--

---
You received this message because you are subscribed to the Google Groups "Slick / ScalaQuery" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scalaquery+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scalaquery/af5a2692-4f09-4685-a6df-0b575e844ffa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Stefan Zeiger
Slick Tech Lead
Typesafe - Build Reactive Apps!
Twitter: @StefanZeiger
Reply all
Reply to author
Forward
0 new messages