Welcome page
Products
Ozeki 10
Apps
Chat
SMS Gateway
SMS with Client Software
HTTP API
SMS from/to Database
MSSQL Express
Oracle SMS
MySQL SMS
MySQL Installation
Create Database
Configure Database User
Test Message
ODBC v5
PostgreSQL
SAP SQL Anywhere
Microsoft Access
PHP SMS API
Solutions
C# SMS API
VB.NET SMS API
SQL Logging
System Database
Robot Controller
Softphone
Connections
Installation guide
Terms and Definitions
SMS
Bulk Messenger
Cluster
Developer tools
Robots
Hardware
Technology
Company


Ozeki 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 connection with the proper connection string 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 through an ODBC driver which is an essential part to send or receive SMS messages with a MySQL Database. Please download it from mysql.com and learn how to install it. An ODBC v5.3 or higher is recommended, so you can have unicode character support. For example Chinese or Arabic.

After you have installed the ODBC driver, please configure a Database User, which is essential in connecting Ozeki SMS Gateway with your MySQL database.

When configuring the Database User, you can use the following connection string:

Connection Type:ODBC
Connection String:Driver={MySQL ODBC 5.3 Unicode Driver}; Server=127.0.0.1;Database=ozekisms;User=ozeki;Password=abc123;Option=4;

The connection string only works if it matches your database details. You should start by changing the IP address from 127.0.0.1 to the actual IP address of your MySQL server. Then replace the database name and also the username/password pair. Choose a user who has granted access to the database.

Please select a connection type and enter the connection string onto the Database User's configuration form
(Figure 1).


Figure 1 - Specifying the connection string for the MySQL database

After the connection string is 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 | Tel: +36 1 371 0150
Home > Products > Ozeki 10 > Apps > SMS Gateway > SMS from/to Database > MySQL SMS
Legal | Privacy policy | Terms of use
Page: 5720 | Login | 54.224.247.42