使用没有API层的离子框架连接到MySQL
是否可以直接连接到没有集成/API层的离子应用程序直接连接到MySQL数据库?
我在网上找到的所有答案都建议在PHP或NODEJS中创建API,但是我想开发一个SQL客户端,并且应用程序的全部要点是能够直接从客户端设备中进行查询。
我不能从客户端使用节点mysql
库。
我正在使用离子6反应。
Is it possible to connect to a MySQL database directly from an Ionic application without an integration/api layer?
All the answers I found online suggest to create API in php or nodejs, but I would like to develop a sql client and the whole point of the application is to be able to make queries directly from the client device.
I cannot use the node mysql
library from client side.
I am using Ionic 6 React.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,正如Mostafa Harb所指出的那样,您无法直接从设备中访问云中的MySQL数据库。您需要使用某种API。
基本流量:
关于离子的好处是它主要是框架 - 敏捷,因此您可以使用自己喜欢的任何API。
就个人而言,我使用 drupal ,这是一个基于PHP ,JSON:API或GraphQl(或三个混合)。
No, as noted by Mostafa Harb, you cannot directly access a MySQL database in the cloud from a device. You'll need to use some kind of API.
The basic flow:
The good thing about Ionic is that it is mostly framework-agnostic, so you can use any API you like.
Personally, I use Drupal, which is a PHP-based CMS that has support for providing access to Ionic via REST, JSON:API, or GraphQL (or a mix of the three).