I’ve been on vacation this week and didn’t spend much time programming… well, not on anything official at least. Mostly I’ve been poking around at stuff between games of Modern Warfare 2 and my chore list from The Wife. One of the more interesting things I’ve been playing with is using MySql with MonoDevelop and Ubuntu.
Since MSSQL normally costs extra in a hosted environment I typically end up using a handful of XML files or serialization to keep track of information. But now that I’ve been using Mono I started to consider that MySQL might be an option for further projects (especially since it’s normally free in hosted environments).
I did a post recently about getting started with cross platform development where I listed some resources to get you started but I didn’t mention anything about using SQL. Below are some tools that can get you started.
Setup for the actual SQL server instance — Standard stuff here…
A couple warnings before you get too far. Linux (or at least Ubuntu) is case sensitive — this means that if you try to include the DLL files for MySQL in your Mono project the case must match! When I downloaded the files they were all in lower case but the DLLs were imported using camel case (mysql.data.dll as opposed to MySql.Data.dll)
Also, I don’t see any way to use LINQtoSQL with MySQL (and it wouldn’t make sense if it did anyways). Be prepared to start writing your own queries just in case.