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

MySQL support #1867

Closed
peacemakr opened this issue Dec 3, 2016 · 35 comments
Closed

MySQL support #1867

peacemakr opened this issue Dec 3, 2016 · 35 comments

Comments

@peacemakr
Copy link

Is there an easy way to use MySQL database with Kong?

I don't understand why MySQL wasn't chosen as the default DB.

@Tieske
Copy link
Member

Tieske commented Dec 3, 2016

no. The question has arisen wether we should make the database pluggable, but that's still an unanswered question.

That said, the default was Cassandra for scalability and availability, MySQL is no match for Cassandra in that case. Postgres was added by popular demand.

@Tieske Tieske closed this as completed Dec 3, 2016
@peacemakr
Copy link
Author

Agree with you on plugin etc but there are plenty of database abstraction libraries available so it'd have been much wiser to choose one to make Kong database agnostic at least.

Plz google "most popular database" and see it yourself.

Also, availability, scalability etc there are many solutions available in MySQL to support that including replication, semi synchronous replication clusters etc. People are complaining about Cassandra and demanding DynamoDB now (see other issues).

Anyway, is there an easy way to isolate the database layer or to rewrite it quickly?

@Tieske
Copy link
Member

Tieske commented Dec 3, 2016

The use case determines the best tool for the job, not popularity. According to your logic we'd all be on Windows by now.

Anyway, adding a new db driver is not an easy task. Basically the /kong/dao/ folder deals with that.

@svaroqui
Copy link

svaroqui commented Dec 7, 2016

+1 to add MariaDB support

@tnucera
Copy link

tnucera commented Jan 31, 2017

+1 to add MariaDB support to run Kong with a Galera Cluster

@amenophis
Copy link

+1 for mariadb !

@Tieske
Copy link
Member

Tieske commented Jan 31, 2017

Can someone explain what use case is covered by MariaDB, not currently covered by either Postgres or Cassandra?

@amenophis
Copy link

amenophis commented Feb 1, 2017

@Tieske There is no specific use case, just we have internally a mariadb cluster. And we don't want to manage a PG or Cassandra cluster.

@tnucera
Copy link

tnucera commented Feb 1, 2017

It's just a shame not to have the choice.

We made the technological choice to have a multi-master cluster MariaDB on Docker Swarm mode that works perfectly (high availability + scalability) and we can't use it for storing Kong's data.
Yet, I think that corresponds to Kong's philosophy.

We can't deploy a Postgres cluster or even Cassandra just for Kong.

So to sum up we like Kong and MariaDB Galera Cluster but it's impossible to make them working together :( sad.

@samek
Copy link

samek commented Feb 1, 2017 via email

@Tieske
Copy link
Member

Tieske commented Feb 1, 2017

as stated above;

Anyway, adding a new db driver is not an easy task. Basically the /kong/dao/ folder deals with that.

As such it is hard to justify putting effort here just because people want us to do something because they don't want to do something else... catch 22.

So don't hold your breath waiting for this. It's probably only going to be here if contributed by the community, or if an enterprise customer is willing to pay for it.

@tnucera I'm very sorry, but I don't like your comment: "It's just a shame not to have the choice." First of all there is a choice, please checkout the abstraction code to support both Cassandra and Postgres, it's a complex matter. Second, I think it is a shame that there are so many people requesting all sorts of things and then complain no body wants to build it for them for free.
Now if you decide to build it, I'll help you out as best as I can with any questions you have or problems you encounter.

@samek thx! Cassandra is a great product (for its use case), but often mis understood by those who don't know it. I'd really advise anyone to take a day and read up on how it works and what it can do. Especially if you're from a SQL background, it will change the way you look at databases.

@aeneasr
Copy link

aeneasr commented Mar 7, 2017

It would be great to see a MySQL driver as for example Google Cloud SQL doesn't offer Postgres and thus I need to manage a spearate postgres/cassandra deploy only for kong.

@li-wl
Copy link

li-wl commented Mar 30, 2017

if you want to use kong with mysql , i push some code based kong 0.10.1 , just can work ,not tested.

https://github.com/li-wl/kong

@SuperMasterBlasterLaser

It would be very good in future that MySQL is going to be added. Some enterprises use strictly MySQL for all their systems.

@kran
Copy link

kran commented Sep 26, 2017

@li-wl will you consider to make a PR to kong ?

@li-wl
Copy link

li-wl commented Sep 29, 2017

I'll try ,but I don't make sure this PR will be accpted. I'll format my code first next week and push it.

@thibaultcha
Copy link
Member

@li-wl Sorry, at this time we would not be accepting such a contribution. We are currently in the process of refactoring our DAO layer, and adding a new database strategy would only delay our work and increase our maintenance overhead. Hopefully, once the DAO improvements are completed, adding new database strategies should be easier. Stay tuned.

@SuperMasterBlasterLaser
Copy link

@thibaultcha week ago new 0.11.1 was released. Does it contain DAO improvements?

@thibaultcha
Copy link
Member

@SuperMasterBlasterLaser Hi,

No, our DAO improvements are scheduled over the course of several future major versions (the first part of it starting from 0.12). It will take some time, sorry.

@lsj3210
Copy link

lsj3210 commented Feb 7, 2018

mysql +1

@thawkins
Copy link

I use Mysql/MariaDB, I have over 400 installs in our systems, and I have a room full of Mysql DBA's, Installing a completely foreign RDBMS system that we have no experience with, or any intention of having any experience with just to support an api gateway is a major pain. So the use case that Mysql supports over Postgres is that we know mysql.

+1 Mysql/MariaDB

@jeremyjpj0916
Copy link
Contributor

MySQL certainly is a common bread and butter db that has decent performance if done right, biggest advantage I have found with MySQL is the variety of clients that support browsing/editing tables.

I am currently building a multi DC Cassandra cluster and my current biggest frustration is the fact I have found 0 open source free Cassandra clients to access and browse/edit my keystores, that is honestly my only complaint though because other than that Cassandra is extremely HA/DR resilient and I am glad Kong makes a focus to use newer DB technology rather than focus on old tech. If anyone knows a good free client drop us a hint hah... So tired of browsing via cqlsh in terminal :| heh.

@cogitaria-admin
Copy link

cogitaria-admin commented Feb 17, 2018

Not to stir the pot but why is it even an open question whether the data store should be pluggable? In any event, how is the scalability and availability of Cassandra a requirement for Kong given you're just storing some configuration data? Feels like a sledgehammer/fly situation. Would there actually be a downside to a file sitting on a network share for this? My perspective is this is just NGINX with integrated scripts, which is why it's such a great tool.

@RobertMlo
Copy link

Hi @thibaultcha,

I've a question regarding your comment. Do you know a final version of Kong with the complete refactoring of DAO layer?

@MichelLiu
Copy link

Hi, everyone! If you want to use kong with mysql, please visit my company website. jiemoshuju. Just checkout the mysql_support branch.
By the way, the mysql_support branch can now support for self defined websites.This branch had already tested.

@korneliakobiela
Copy link

Hey, @MichelLiu link doesn't work, shows 404 error. Can you fix it to show us your solution?

@MichelLiu
Copy link

Hi,@korneliakobiela. You can visit it tomorrow.I am preparing self-defined websites konga dashboard.

@yoyokko
Copy link

yoyokko commented Aug 24, 2018

@korneliakobiela broken url was fixed. You can try it now.

@derekperkins
Copy link

The new DAO is landing in 1.0, so work here should be able to start moving forward:
https://konghq.com/blog/announcing-kong-1-0/

@MichelLiu
Copy link

support kong-1.0.3 for Mysql/MariaDB 5.7.x, wei/mysql branch

@joshuabuildsthings
Copy link

support kong-1.0.3 for Mysql/MariaDB 5.7.x, wei/mysql branch

Anyone know if MySQL or even pluggable DB Support is on the roadmap for the future? All the issues I found were closed without any clear indication of a path forward.

@wangfengjun404
Copy link

mysql+1

mysql is a wild using database ,and good enough to support kong gateway.

for me,mysql cost less

@koolay
Copy link

koolay commented Aug 7, 2020

I can't undstand why mysql is not buildin supported in so pop product.

@daviddone
Copy link

+1 for mysql

@muhammadn
Copy link

@daviddone , et. all -

We're working on a new API Gateway called APIVault that is a lot simpler that supports MariaDB, PostgreSQL and Microsoft SQLServer. (yes! it supports windows as well)

Feel free to chime in to give ideas on what you need because we always want to hear more feedback from the community.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests