I decided to get the actual mime type for a sql file so that the file would download appropriately without adding .txt to the file. Well you would think that I was trying to find how to get into Fort Knox or something. The general consensus is that most people just want to use text/plain. Not I said the mouse! Well I decided to use something I had used before - the Gnome Mime Type database. This database had allowed me to find a mime type that worked properly with some other Microsoft files that I was saving and retrieving from a database (for example, the mime type for a .cs file in the Gnome library is text/c-sharp and it works perfectly). Sooooo back to my good old friend.
The mime type for a .sql file is text/x-sql. The Gnome mime library is pretty extensive. The goal is to be a resource and standard way of using and finding mime types.
This is a simple thing, but since Google wasn't the easiest resource for finding the mime type for .sql files, I thought you might find this useful.
PROBLEM:
What is the .sql mime type? Where can I find the .sql mime type? Should I use text/plain or another mime type for .sql files?
SOLUTION:
You can use text/x-sql and you can use the Gnome library to find out more mime types as needed.
Smooches,
Kila Morton