Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Improve DB config docs for default Postgres/MySQL connections #1861

Open
adeperio opened this Issue Mar 5, 2018 · 7 comments

Comments

Projects
None yet
6 participants
@adeperio
Copy link

commented Mar 5, 2018

Just a suggestion but as a first time user of Slick, the docs around database configuration were incomplete for connecting to a PostgresDB using the Database.forConfig method.

It's great we've got H2 docs in there, but seeing as Postrges and MySQL are two of the more popular RDBMS db's out there, I think it would save a whole lot of people a lot of time if there was a more complete example of how to configure their projects with Slick. At the very least for the recommended TypeSafe config approach for connecting to a localhost db.

For example, my final configuration files that I ended up with to complete a connection with slick, using connection pooling to localhost, looked like this:

build.sbt
image

application.conf
image

I think if I had this in there it would save people a lot of time trying to find these missing pieces of info

@adeperio adeperio changed the title Suggestion: Improve DB Connection Docs for default settings for with HikariCP and postgres Suggestion: Improve DB config docs for default Postgres/MySQL connections Mar 5, 2018

@d6y

This comment has been minimized.

Copy link
Contributor

commented Mar 5, 2018

Hello @adeperio - would you be interested in creating a pull request to improve this documentation?

I think the relevant page would be: http://slick.lightbend.com/doc/3.2.1/database.html

The source for the page is: https://github.com/slick/slick/blob/master/doc/src/database.md

You can build the page locally by cloning the slick github project and running sbt ornate.

@hvesalai hvesalai added this to the Documentation ideas milestone Mar 5, 2018

@adeperio

This comment has been minimized.

Copy link
Author

commented Mar 5, 2018

Hey @d6y Sure can :) I'll start adding it in..

adeperio pushed a commit to adeperio/slick that referenced this issue Mar 7, 2018

hvesalai added a commit that referenced this issue Mar 14, 2018

Merge pull request #1867 from adeperio/docs-postgres-config
Adding Typesafe connection config docs for postgres. ref issue #1861
@aturner-tvpage

This comment has been minimized.

Copy link

commented Apr 24, 2018

SO SO SO much this. OMG. I've spent HOURS trying to get the right combination of magic to get MySQL working, and now I'm getting a driver error. I'm totally going to miss my deadline for this project, I've never had this much trouble getting any Scala system working. gah.

@sergigp

This comment has been minimized.

Copy link

commented May 8, 2018

After spending 4 hours trying to do this i ended up here. Thank you @adeperio , I fucking love you.

@adeperio

This comment has been minimized.

Copy link
Author

commented May 9, 2018

@sergigp This caught me out too, glad you found it helpful as well!
@aturner-tvpage Hopefully you've figured out your MySQL config woes. I think MySQL config would be a welcome addition to the docs as well

@hvesalai

This comment has been minimized.

Copy link
Member

commented May 9, 2018

Hi all, Slick is currently being developed and maintained by the community, i.e. you and me. If this was such a good piece of advice, I hope one of you is up to the task of turning it into a good PR so that those coming after you might find it from a more convenient place.

@stefanholzmueller

This comment has been minimized.

Copy link
Contributor

commented May 29, 2018

Recently set up Slick and thought I could add a simple example. It is ready as PR #1916.

@aturner-tvpage and @sergigp please have a look!

hvesalai added a commit that referenced this issue Jan 29, 2019

Merge pull request #1916 from stefanholzmueller/docs-mysql-config
added configuration example for MySQL to docs for issue #1861
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.