Are there JavaScript bindings for MySQL?

后端 未结 9 1949
礼貌的吻别
礼貌的吻别 2020-12-17 00:56

I want to access a MySQL database directly from JavaScript code in an HTML page in Firefox.

Does such a library exist?

To be very clear, CGI+Ajax wil

9条回答
  •  情深已故
    2020-12-17 01:36

    JavaScript code lives inside the browser. It can make HTTP requests to the outside, but not really much more. So by design you won't be able to bind to a program running locally. If MySQL did expose an HTTP service, it might be possible, but that's not the case.

    You might be able to find a plugin for Firefox that exposes a MySQL API to JavaScript, but I don't know any such plugin.

    If you don't specifically need MySQL, but just a database accessible from JavaScript code, have a look at Google Gears. It is a Firefox / Internet Explorer plugin that exposes an SQLite database and a few other goodies.

    If you give more information on what you are trying to build, we might be able to give you better advice...

提交回复
热议问题