Exposing MySQL database/table using REST

2020-01-30 08:00发布

What would be the easiest way to expose a MySQL database using a REST interface?

The only guidelines that I can find on the Internet is just using NetBeans. I am not a big fan of NetBeans...

I'd like to retrieve that and be able to update data on the database using this REST interface.

FYI, this is for an iPhone application that I am currently working on.

标签: mysql rest
15条回答
男人必须洒脱
2楼-- · 2020-01-30 08:33

MySQL 5.7.4 and above work with the HTTP plugin, which offers a HTTP REST API.

SQL: SELECT * FROM simple ORDER BY id
URL: http://127.0.0.1:8080/sql//SELECT+%2A+FROM+simple+ORDER+BY+id

However, it currently comes with a NOT FIT FOR PRODUCTION warning.

Blog announcement.

Docs.

查看更多
闹够了就滚
3楼-- · 2020-01-30 08:33

In 2019, you may use PHP-CRUD-API. It is a single file PHP script that adds a REST API to a MySQL 5.6 InnoDB database. PostgreSQL 9.1 and MS SQL Server 2012 are also fully supported.

Disclaimer: I wrote it.

查看更多
Juvenile、少年°
4楼-- · 2020-01-30 08:36

You may want to have a look at jongo. It's a REST API for JDBC.

查看更多
登录 后发表回答