MySQL configuration

If you wish to use MySQL as the system database, please configure the following SQL templates in the Server preferences form:

The database connection type, you should choose is:

Odbc

The database connection string you should use is:

Driver={MySQL ODBC 5.1 Driver};Server=127.0.0.1;Database=ozekisms;User=ozeki;Password=abc123;Option=4;

Create

CREATE TABLE IF NOT EXISTS $tablename (`messageid` VARCHAR(60) NOT NULL,
`createdate` DATETIME NULL,`serializedmessage` TEXT NULL,PRIMARY KEY(`messageid`));

Load index

SELECT messageid FROM $tablename

Load

SELECT messageid,serializedmessage FROM $tablename WHERE messageid IN ($idlist)

Save

INSERT INTO $tablename (messageid,createdate,serializedmessage) values ('$messageid',now(),'$serializedmessage')

Delete

DELETE FROM $tablename WHERE messageid IN ($idlist)

Move

INSERT INTO $tablename (messageid,createdate,serializedmessage) SELECT messageid,
createdate,serializedmessage FROM $sourcetable WHERE messageid IN ($idlist)

Find old

SELECT messageid FROM $tablename WHERE createdate<DATEADD(now(), INTERVAL -$maxage SECOND)

Delete old

DELETE FROM $tablename WHERE createdate<DATEADD(now(), INTERVAL -$maxage SECOND)

More information