I'm trying to do a simple GET request to a database running on my
local machine to retrieve a word document.
This will only work if the database support HTTP protocol access to files, and you have the correct URL to the file, would you be able to do this. Most databases do not have simple file access in this way, but some might. As a test, see if you can put "http://localhost/databaseURLgoeshere" in your browser's URL bar and successfully download the file.
If that doesn't work, then they might also have a web service that is more complicated, in that you send parameters to query the service. We can't help you without without knowing what database web service you are trying to query.
$.ajax('http:localhost:databaseURLgoeshere')
There should be a // after http:, also you are putting http:localhost:databaseURLgoeshere where a port number would go. Instead it would probably be something more like this "http://localhost/databaseURLgoeshere" or "http://localhost:1234/databaseURLgoeshere" where 1234 is whatever port the server is listening on.
Lastly, you can't download files with .ajax, see here for explanation and workarounds:
Download a file by jQuery.Ajax
The result of a ajax call will return the data into a callback result, it won't immediately be downloaded. Usually the result of an ajax call is some json, xml, or html. If it were HTML for example, you would then reight javascript to insert that result wherever you want it in the page. My point being, the ajax call just retrieves the file/xml/html/data etc., it doesn't actually make it appear to the user. You have to write additional javascript to place it on the page.