Products
Ozeki 10
SMS
Ozeki NG SMS Gateway
SMS Gateway
Quick Start Guide
SMS with Client Software
HTTP API
SMS from/to Database
PHP SMS API
Solutions
C# SMS API
VB.NET SMS API
SQL Logging
System Database
MySQL
Oracle
MSSQL 2008
MSSQL 2012/2014
Import messages
Switch from file
SMPP
Message Server 6
SMS Wall
IP SMS Gateway
Android SMS
Excel SMS
Bulk Messenger
Cluster
Developer tools
Robots
Hardware
Technology
Company


Ozeki 10 SMS Gateway
System Database System Database | Oracle Oracle

MySQL configuration

The MySQL database server is the most popular solution for small companies. In case you already use a MySQL database server, you should set the connection string in the server preferences of Ozeki 10. You can use the ODBC database driver for MySQL.

You will be lead through a few simple steps. Let's start by clicking 'Edit/Server preferences' from the top menu of Ozeki SMS Gateway (Figure 1). You should start Ozeki SMS Gateway from Ozeki 10-s desktop.

Server preferences
Figure 1 - Click 'Edit/Server preferences' from the top menu

Tick 'Use a database server instead of file system to store messages' to activate the database server for sending and receiving SMS messages (Figure 2). You will receive an error message if you use the file system option, but you do not have the correct files. You can switch to the database option by importing messages from your old files.

Enable System Database
Figure 2 - Use a database server instead of file system to store messages

Find the database connection string of your ODBC driver. If you use the example on Figure 3, you should replace the Database name, Username and Password to your own database server preferences.

Connection string type:Odbc
Connection string:Driver={MySQL ODBC 5.3 Unicode Driver};Server=127.0.0.1;Database=ozekisms;User=ozeki;Password=abc123;Option=4;
Figure 3 - Copy the connection string to your SMS Gateway's database settings

Provide Connection String
Figure 4 - Paste the connection string to your SMS Gateway

Modify SQL Statements
Figure 5 - Modify SQL Statements on different message actions



Default statements for different message actions

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)

In older version you needed to restart Ozeki SMS Gateway's service to apply the new database server connection preferences and message action statements.

Restart service
Figure 6 - Restart Ozeki SMS Gateway's service

Check in the message log if Ozeki SMS Gateway has created the tables (Figure 7).

Ozeki SMS Gateway has created the tables
Figure 7 - Check in the message log if Ozeki SMS Gateway has created the tables

Send a test message

Send Test message
Figure 8 - Send Test message

Message appears in the database
Figure 9 - The message should appear in the database


Copyright © 2000- - Ozeki Ltd | info@ozeki.hu
Home > Products > SMS > SMS Gateway > System Database > MySQL
Legal | Privacy policy | Terms of use
Page: 5793 | Login | 3.214.184.250