Ok, the title is a mouthful, but since I had to piece things together from various posts, I figured I save somebody else the trouble if they need to do it as well!
Let's begin with a quick introduction in case you found this page by coincidence and you'd like to learn more. Sedna is an open source XML Database that is licensed under Apache License 2.0. An XML Database can store, query, and update XML data natively using XQuery FLWOR expressions. This is particularly useful if you're working with semi-structured data. Aside from being able to manage a native XML Database, Sedna can also connect via ODBC to other databases and expose their data in a simple XML format. This can be especially useful if you want to convert a relational database, such as MySQL, to an XML Database, such as Sedna. That should cover the basics. The final part is that this guide uses OS X 10.5 x86 (Leopard), which may or may not matter to you. Finally, you'll probably need to install the OS X development tools since we'll need to compile the Sedna source code to enable SQL support (something about GPL code contamination or other). Now, let's go!
export ACTIVE_CONFIGURATION=Release
export ENABLE_TRIGGERS=1
export EL_DEBUG=0
export SQL_CONNECTION=1
export SEDNA_INSTALL=~/Applicationsmakemake installSedna is not ready to rumble, but we still need to install the ODBC drivers to connect to our MySQL database.
Next stop is to install the ODBC drivers required by Sedna to connect to MySQL database. Note that you don't need the databae to be actually on the same machine. You only need the ODBC drivers on the same machine as Sedna.

Since OS X already ships with ODBC support, this was the only step we needed to perform, or almost. Just one minor step is required so that Sedna can load the OS X ODBC libary.
Sedna expects a libodbc.so file in /usr/lib. However, this file is called libiodbc.dylib on OS X. Not a problem though. All we need to do is create a symbolic link (symlink) so that libodbc.so resolves to libiodbc.dylib
/usr/lib directorysudo ln -s libiodbc.dylib libodbc.soNow we're ready to take Sedna for a test drive. If you haven't used Sedna before, we'll first need to start it up and create a database. No problem here. The steps are very simple. If you'd like a bit more information on what's going on, the steps below are almost identical to those from Sedna's Quick Start guide.
~/Applications/sedna directory (or wherever you actually installed Sedna to).bin/se_govbin/se_cdb testbin/se_sm testtest.xquery. Make sure to replace the ODBC driver name shown in RED with the one that you noted down from the "ODBC Adminstrator" tab. The connection string is fairly simple once past the ODBC driver information. After the :// use the IP address or hostname where your MySQL database is connected. Then comes the username and password. For this example, I connected to my developer Deki 8.08 database to fetch all records from the "services" table.declare namespace sql="http://modis.ispras.ru/Sedna/SQL";
let $connection := sql:connect("odbc:MySQL ODBC 5.1 Driver://192.168.1.72/wikidb", "wikiuser", "password")
for $x in sql:execute($connection, "SELECT * FROM services")
return
<service id="{data($x/@service_id)}">
<sid>{data($x/@service_sid)}</sid>
<uri>{data($x/@service_uri)}</uri>
<description>{data($x/@service_description)}</description>
<local>{data($x/@service_local)}</local>
<enabled>{data($x/@service_enabled)}</enabled>
<status>{data($x/@service_last_status)}</status>
<modified>{data($x/@service_last_edit)}</modified>
</service> bin/se_term -file examples/mysql/test.xquery testThat's it! Your Sedna installation is now able to fetch records via ODBC from your MySQL database.
The Sedna website has lots of documentation, but I recommend you look into the doc folder of your Sedna installation. It contains PDFs that are much easier to browser than their online counterparts.
Please leave comments or edit this page directly if I left something out that was important. Enjoy!