• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 279
  • Last Modified:

How to connect to Mysql on another server from javascript on server with no server side.

I am developing a website on an IIS server that is not allowing any server side tools.  I would like to be able to connect to a database. Most preferable is to keep every thing on this IIS server.  Would be nice to have an access database sitting in a directory somewhere on the web server, but don't believe it is possible due to no server-side.

I have another server running apache, php, and mysql I could connect to if the above is not possible.  If using this alternate route, how would I connect to the remote server to execute SQL queries?

  • 2
1 Solution
Maybe someone else can chime in, but as far as I'm aware, it's not possible to connect to a SQL/MySQL database using javascript as js is a client side scripting environment.

As for the apache/php/mysql setup, you're still in the same situation - you're not going to be able to connect to the MySQL instance using just JavaScript from the IIS host.
jrlandersAuthor Commented:
Thanks DVation191 for your reply.

Question / Suggestion?

So if I cannot hit a data base locally or remote to the web server I am working with,  what is the best way to pull data from a file to display complex data elements?

Let me see if I can give you an example:
I need to display an image of a facility, address, staff that work at that facility, phone numbers, specific departments in that facility, and the staff in that department, details about the department, and equipment in each department!  Whew!

I can do it with XML... just it seems to messy and hard to organize the relationships.

Sorry I didn't see your follow up question until now. I have limited experience with AJAX, but maybe this can help you?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now