Unknown SMSD service type (“MYSQL”)

That message show up when I install gammu from source in Ubuntu server 8.04 :

root@dns:/home/edpteam# gammu –smsd MYSQL smsdrc
Unknown SMSD service type (“MYSQL”)

After dig in mailing list I have clue to install mysql library :

apt-get install libmysqlclient15-dev

apt-get install libmysqlclient15-dev
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages were automatically installed

and are no longer required:
debhelper intltool-debian po-debconf libgammu-common

gettext libgammu3
libbluetooth2 libmm14 html2text
Use ‘apt-get autoremove’ to remove them.
The following extra packages will be installed:
Suggested packages:
The following NEW packages will be installed:
libmysqlclient15-dev zlib1g-dev
0 upgraded, 2 newly installed, 0 to remove and 10 not

Need to get 7375kB of archives.
After this operation, 21.1MB of additional disk space

will be used.
Do you want to continue [Y/n]? y
Get:1 http://us.archive.ubuntu.com hardy/main

zlib1g-dev 1: [160kB]
Get:2 http://us.archive.ubuntu.com hardy-updates/main

libmysqlclient15-dev 5.0.51a-3ubuntu5.1 [7214kB]
Get:3 http://us.archive.ubuntu.com hardy-updates/main

libmysqlclient15-dev 5.0.51a-3ubuntu5.1 [7214kB]
Fetched 2897kB in 50min1s (965B/s)
Selecting previously deselected package zlib1g-dev.
(Reading database … 39442 files and directories

currently installed.)
Unpacking zlib1g-dev (from

…/zlib1g-dev_1%3a1.2.3.3.dfsg-7ubuntu1_i386.deb) …
Selecting previously deselected package

Unpacking libmysqlclient15-dev (from


Setting up zlib1g-dev (1: …
Setting up libmysqlclient15-dev (5.0.51a-3ubuntu5.1)

Processing triggers for libc6 …
ldconfig deferred processing now taking place

Recompile gammu to detect libmysqlclient and try again :

root@dns:/etc# gammu –smsd MYSQL /etc/smsdrc

Yes, this time no more error message :-)

Stop GAMMU smsd (27)

C:\gammu2>gammu –smsd MYSQL smsdrc
Log filename is “smsdlog”
Stop GAMMU smsd (27)

Fri 2008/06/06 11:06:10 : Stop GAMMU smsd (27)
Fri 2008/06/06 11:06:53 : Start GAMMU smsd
Fri 2008/06/06 11:06:53 : PIN code is “1234”
Fri 2008/06/06 11:06:53 : commtimeout=1, sendtimeout=10, receivefrequency=0, resetfrequency=0
Fri 2008/06/06 11:06:53 : deliveryreport = no
Fri 2008/06/06 11:06:53 : phoneid =
Fri 2008/06/06 11:06:53 : No table for sent sms: Table ‘sentitems’ is marked as crashed and should be repaired

Fri 2008/06/06 11:06:53 : Stop GAMMU smsd (27)

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\edp>cd c:\appserv\mysql\bin

C:\AppServ\MySQL\bin>mysql -uroot -p
Enter password: ********
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4607
Server version: 5.0.45-community-nt-log MySQL Community Edition (GPL)

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

mysql> use sms2;
Database changed
mysql> repair table sentitems;
| Table          | Op     | Msg_type | Msg_text |
| sms2.sentitems | repair | status   | OK       |
1 row in set (0.05 sec)


Don’t have idea why Table ‘sentitems’ is marked as crashed.

MySQL and Null

Just for my own record, dealing with Null type field.

Checking with :

select * from tablename where field1=”  -> this one not work

select * from tablename where field1=’Null’ -> same too

is null is the answer

select * from tablename where field1 is null

Save my day, thanks to St4r :-)

Mysql Trigger Tutorial and Tools

Deal with gammu and mysql make learn more about mysql feature in mysql 5.0 called trigger.

Books always good to start with so I choose MySQL Stored Procedure Programming book to start with but others might help to for someone looking for practical solution in cookbook form etc :

  1. High Performance MySQL: Optimization, Backups, Replication, and More
  2. MySQL Cookbook
  3. MySQL Stored Procedure Programming
  4. MySQL in a Nutshell (In a Nutshell (O’Reilly))
  5. MySQL Administrator’s Bible (Bible (Wiley))
  6. Understanding MySQL Internals

Looking around in google make me find some interesting links around trigger in mysql, here the list :

Wew, a lot of example but for deliver due project I’ll use cron. Once I get the point I’ll try out trigger :-)