Analytics plugin Mysql DB Setup

18 views
Skip to first unread message

HUSSEIN KADIRI

unread,
May 20, 2021, 7:04:53 PMMay 20
to go...@googlegroups.com
Hi,
Trying to setup a Mysql DB for the analytics plugin. Per the configuring database page, GoCD supports Postgres, Mysql, H2.

I'm trying to connect mysql DB to it but it fails.

The analytics page suggests postgres per the screenshot and the error message.

jvm 1    | 2021-05-20 22:33:24,616 ERROR [qtp1374887279-35] p.c.t.g.a.c.t.g.a.d.PostgresqlDatabase:127 [plugin-com.thoughtworks.gocd.analytics] - Error establishing connection with the database
jvm 1    | java.sql.SQLException: Cannot create PoolableConnectionFactory (Protocol error.  Session setup failed.)
jvm 1    | at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2294)
jvm 1    | at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:2039)


Does the analytics plugin support other DBs or only postgres? 
Does anyone have an example configuring a non-Postgres DB for the analytics plugin?


--
Hussein Kadiri
Screen Shot 2021-05-20 at 3.54.08 PM.png

Marques Lee

unread,
May 20, 2021, 7:09:34 PMMay 20
to go...@googlegroups.com
I’m pretty sure that while GoCD supports MySQL, the analytics plugin was always Postgres-only. I don’t think anyone has added support for other DBs.

--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/CAFD%2B7Dk%2BMF6uSPi9dnnz8EQL5CktSo0mF%2BWNf-abSm782Y%3D71g%40mail.gmail.com.

Marques Lee

unread,
May 20, 2021, 7:16:23 PMMay 20
to go...@googlegroups.com
A bit of history:

GoCD used to only support h2 and postgres; the analytics plugin was originally a “premium” plugin which required postgres.

Later on, support for MySQL was added (I think as part of, or at least around the same time we moved to liquibase as our ddl manager) to GoCD. Nobody added that support to analytics as it really wasn’t in demand and thus not a priority. Once commercial support stopped and the plugin was open sourced, it was released as-is (almost, anyway —some changes required for licensing purposes with a dependency).

HUSSEIN KADIRI

unread,
May 21, 2021, 9:03:50 AMMay 21
to go-cd
Thanks for the historical context. How much effort would it be to add support for Mysql to the analytics plugin?
We primarily use mysql. Would need to jump through some hoops to use postgres. 
Trying to decide if its worth jumping through those hoops OR implementing Mysql support for analytics.

Aravind SV

unread,
May 22, 2021, 2:01:29 PMMay 22
to HUSSEIN KADIRI, go-cd

I’d think using Postgres would be easier than making sure all the queries work properly and do what they’re supposed to. Some of the queries are here.

Though the queries are probably not complex, building the infrastructure (both code and test) to ensure that both DBs work, is likely much more work.

Marques Lee

unread,
May 22, 2021, 3:32:39 PMMay 22
to go...@googlegroups.com
Hmm, trying to remember. It’d be more than just adding the jdbc driver. Probably that, ui changes for the config screen, create db migrations for MySQL. I think we used a case insensitive extension for postgres so whatever the equiv is in MySQL config (though it might be insensitive by default). Probably some other things that I’m missing. Not sure if there’s an api change or not required for GoCD side.

It’s probably straightforward but not trivial. I could see spending a few days to get it right. I suppose weigh that against what it takes to get postgres working?

Marques Lee

unread,
May 22, 2021, 3:34:03 PMMay 22
to go...@googlegroups.com
That said I haven’t taken a look at the database parts of the code in a long time, so there’s that. I hope I’m not underestimating the work.

On Fri, May 21, 2021 at 6:03 AM HUSSEIN KADIRI <hoka...@gmail.com> wrote:

HUSSEIN KADIRI

unread,
May 22, 2021, 6:38:10 PMMay 22
to go...@googlegroups.com
Thanks for the info. Right now its looking like it's about the same amount of effort to either get postgres in our systems or get mysql working for GoCD.

You received this message because you are subscribed to a topic in the Google Groups "go-cd" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/go-cd/GFTkOtjKALU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to go-cd+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/CAPKX9jacs8Yp37V1h6iN861%3DbhpEx2%3D99Nc7zK8zkB9WZDyzGg%40mail.gmail.com.


--
Hussein Kadiri

Marques Lee

unread,
May 23, 2021, 4:03:00 PMMay 23
to go...@googlegroups.com
I think Arvind is probably right here. There’s enough moving parts around this to make it substantial work now that I’ve dug into the code more. I think it could be spiked in a few days to get something kind of working but longer than that to really flesh out all the things we’d need to bring it to the level of quality required for it to be truly supported and reliable.

HUSSEIN KADIRI

unread,
May 24, 2021, 7:33:33 PMMay 24
to go...@googlegroups.com
I see, thanks for the feedback. I'll check back it anything changes while I try to get Postgresql installed on my end.

You received this message because you are subscribed to a topic in the Google Groups "go-cd" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/go-cd/GFTkOtjKALU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to go-cd+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/CAPKX9jZDDKMX8rOTVryFkgZYFCax5s_%3DX%2BoF-N1x32tEWCnzQg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages