sanos home

MySQL Database Server for sanos


Downloads:

sanos-mysql.zip
sanos-mysql-src.zip

This is a sanos port of the popular open source database server MySQL from MySQL AB. This demonstrates how to port a non-trivial server application to sanos. You can use this port to build a simple dedicated database server appliance. The port is based on MySQL server version 4.1.7.

You can download the ported source from here and build the mysql project in the sanos/build directory. After building mysqld.exe you can run the mkmysqlcd script in the img directory to build the ISO install image.

Alternatively you can use  the pre-compiled image. The pre-compiled image is packaged as an ISO CD image that you can copy to a CD using a your favorite CD-burner program and then boot the computer from the CD-ROM. You can also try it out using VMware by setting the sanos-mysql.iso as the ISO image for the CD-ROM device.

If you experience problems booting from the ISO CD image this might be because your BIOS does not support No-Emulation CD boot mode. You can change to the more widely supported Floppy-Emulation CD boot mode by changing the last two lines in mkmysqlcd.cmd to:

\sanos\tools\mkdfs -d usr\BOOTIMG.BIN -b usr\install\sanos\cdboot -l usr\install\sanos\osldr.dll
                   -k usr\install\sanos\krnl.dll -c 512 -C 1440 -I 8192 -i -f -S . -F bootimg.lst
\sanos\tools\mkisofs -J -c BOOTCAT.BIN -b BOOTIMG.BIN -o sanos-mysql.iso usr

After booting from the CD you can install sanos and mysql to the hard disk by running the setup program:

\$ setup /usr/install/setup.ini

WARNING: Running the setup program will destroy all files on the first partition of the primary disk.
DO NOT DO THIS UNLESS YOU KNOW WHAT YOU ARE DOING !!!

After the install finishes you can reboot from the hard disk and sanos will start the mysql server. You can use the mysql tools like mysqladmin and mysql from a client machine to administer the server. After the server is started you could ping the server with the following command:

c:\mysql\bin> mysqladmin -h <ipaddr> -u root ping

Creating a database:

c:\mysql\bin> mysqladmin -h <ipaddr> -u root create <dbname>

Shutting down the database server:

c:\mysql\bin> mysqladmin -h <ipaddr> -u root shutdown

Please notice that the installation does not have a root password for the MySQL server and that the usual restriction of root to localhost has been removed for the sanos port in order to allow administration of the server from a remote machine.