Ozeki 10 SMS Gateway
Oracle SMS Oracle SMS | MySQL Installation MySQL Installation

SMS from/to MySQL

You can combine Ozeki SMS Gateway with a MySQL database to send, receive and store SMS messages. In this tutorial you can see how to install and configure the MYSQL database connection and how to create the recommended database structure.

How to send SMS from MySQL
MySQL Installation (Video guide)
Create Database Tables (Video guide)
Configure Database User (Video guide)
Send Test Message (Video guide)

The solution uses Ozeki SMS Gateway installed on your PC. The Database User of SMS Gateway can easily communicate with your MySQL database user.

Please define the MYSQL database connection details onto the Database User's configuration form
(Figure 1).


Figure 1 - Specifying the connection string for the MySQL database

After the connection details are set, it is very important to create the database table structure. The example database in this tutorial consists of two tables 'ozekimessageout' and 'ozekimessagein'. You can choose any table name, although you should keep them in mind. You are recommended to use the following table layout:

MySQL create table script:

CREATE TABLE ozekimessagein (
id int(11) NOT NULL auto_increment,
sender varchar(30) default NULL,
receiver varchar(30) default NULL,
msg text default NULL,
senttime varchar(100) default NULL,
receivedtime varchar(100) default NULL,
operator varchar(100) default NULL,
msgtype varchar(160) default NULL,
reference varchar(100) default NULL,
PRIMARY KEY (id)
) charset=utf8;
ALTER TABLE ozekimessagein ADD INDEX (id) ;

CREATE TABLE ozekimessageout (
id int(11) NOT NULL auto_increment,
sender varchar(30) default NULL,
receiver varchar(30) default NULL,
msg text default NULL,
senttime varchar(100) default NULL,
receivedtime varchar(100) default NULL,
reference varchar(100) default NULL,
status varchar(20) default NULL,
msgtype varchar(160) default NULL,
operator varchar(100) default NULL,
errormsg varchar(250) default NULL,
PRIMARY KEY (id)
) charset=utf8;
ALTER TABLE ozekimessageout ADD INDEX (id);

Figure 2 - CREATE database tables

Please maintain the 'id' field in your database to support faster SQL updates.

If you modify database tables. For example if you add additional columns, please review the SQL templates used by Ozeki SMS Gateway. Please make sure that they are compatible with the customized database table layout.

 
Copyright © 2000- - Ozeki Ltd | info@ozeki.hu
Home > Developers guide > SMS from SQL > MySQL SMS
Legal | Privacy | Terms of use | 5720
3.228.10.34 | 92.118.27.157 | Login