如何将MySql数据库与Firebase连接? [英] How to connect MySql database with Firebase?
问题描述
如何将MySql数据库与Firebase连接.这是用于实时数据更新并在浏览器上显示.已经创建了Firebase帐户并获得了配置代码.现在,我想将现有的基于MySql的数据库与Firebase连接起来.
How to connect MySql database with Firebase. This is for real time data updates and show it on browser. Already created Firebase account and got config code. Now I want connect my existing MySql based database with Firebase.
请帮助
谢谢
推荐答案
最近我也对此感兴趣.
This is something that I have been interested in recently as well.
这是一篇很棒的文章,应该回答您的问题:
Here is a great article that should answer your question:
https://firebase. googleblog.com/2013/03/where-does-firebase-fit-in-your-app.html
模式2:具有服务器代码的基于Firebase的应用程序"可能会为您提供将Firebase连接到MySQL DB的解决方案.
"Pattern 2: Firebase-powered app with server code" can probably provide you with a solution to connect Firebase to your MySQL DB.
您可以做的是,当MySQL数据库中发生需要更新的事件时,让您的PHP应用程序将更新发送到您的firebase数据库.如果您所有的客户都随后正在订阅/监视Firebase数据库的更改,那么您已经(虽然是间接地)将MySQL数据库与Firebase数据库连接了.
What you could do is have your PHP app send updates to your firebase db when ever something update-worthy happens in your MySQL database. If all your clients are then subscribing/watching the changes to your Firebase db, then you have (albeit indirectly) connected your MySQL database with your Firebase db.
希望这会有所帮助.
这篇关于如何将MySql数据库与Firebase连接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!