In Automatic Mouse and Keyboard, it is very easy to use SQLite database. The following sample shows you how to create a table, and how to insert and get a record.
And you can download the sample from sqlite.amk
To connect to MySQL with Automatic Mouse and Keyboard, you need to install the MySQL ODBC Driver. You can download the driver from: http://www.mysql.com/downloads/connector/odbc/
Download the connector which is compatible with your Windows. Then install it and create a MySQL data source.
Then you can call the function Database_Connect with connection string:
Driver=MySQL ODBC 5.3w Driver;Server=localhost;Option=16834;Database=test;User=root;Password=123;
And you can get more help about MySQL ODBC Driver with google.