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

Posted on 2011-10-14
Last Modified: 2012-06-22
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?

Question by:jrlanders
    LVL 20

    Accepted 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.

    Author Comment

    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.

    LVL 20

    Expert Comment

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

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    Introduction HyperText Transfer Protocol ( or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
    Creating and Managing Databases with phpMyAdmin in cPanel.
    Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
    Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now