dq8081 2013-04-27 15:06
浏览 32
已采纳

为MySQL数据库创建API [关闭]

I have two websites which I'm going to call here mywebsite1.com which has a MySQL Database and mywebsite2.com which does not have a MySQL Database and both with PHP.

I need a database in mywebsite2.com, so I wanted to use the database from mywebsite1.com. My problem is "how do I do that?". It's easy to save data to the database, just send it as $_GET[] data and do a query.

The problem is to read data from the database. What are my solutions? Is there any API already made? Should I output the data has an XML file ? I'd like to hear some solutions with pros and cons.

I have no possibility of buying an MySQL service for mywebsite2.com, so please don't suggest that. This are the resources I have, so only use this in your answers OR other free solutions.

  • 写回答

2条回答 默认 最新

  • doujindou4356 2013-04-27 15:09
    关注

    You can have access to your MySQL database from your second site. Easily.

    If it has cPanel you have to enable Remote MySQL option and add the IP of your second site so that connections from it will be trusted!

    Then you can access it directly from the second site.

    http://docs.cpanel.net/twiki/bin/view/11_30/CpanelDocs/RemoteMySQL

    In your case that you have a free host, You can use Xeround which provides free mysql databases in the cloud!

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 LiBeAs的带隙等于0.997eV,计算阴离子的N和P
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 来真人,不要ai!matlab有关常微分方程的问题求解决,
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?
  • ¥100 求三轴之间相互配合画圆以及直线的算法