Power Network Services with MySQL - Page 2

You can drive network services with a powerful MySQL backend. Here's a collection of tips on how to manage MySQL while connecting it to Postfix and Samba.

 By Carla Schroder
Page 2 of 2   |  Back to Page 1
Print Article

Continued From Page 1

What MySQL Version?

mysql> select version();

MySQL Administrator
Now that you're a wizard at the MySQL command line, check out the MySQL Administrator. It is a very nice graphical interface for MySQL that lets you perform all the common administrative functions: user management, backups and restores, and connection and server health monitoring.

Using MySQL with Samba
The samba-doc package comes with a script for creating the table that holds your user accounts, examples/pdb/mysql/mysql.dump. Of course you can create your own table from scratch; this is how to use the script to create the table:

mysql> samba_auth < /usr/share/doc/samba-doc/examples/pdb/mysql/mysql.dump

Then Samba needs some configuration tweaks; see the Samba/MySQL howto.

Using MySQL With Postfix
There are no official Postfix scripts for creating tables, but you can find a good third-party script here. (See the Postfix howto page for a nice assortment of excellent howtos.) One way or another, create your database and populate it with your desired tables, like transport, virtual, and users. Then edit a bunch of Postfix configuration files so Postfix knows where to find everything, and you'll have a flexible backend that can be used by all the components of a mail server – POP, IMAP and SMTP. And all the users and domains are completely virtual, so you can easily add, remove and change accounts, just like an ISP.

Another fast, fully-featured, Free/Open Source database worth checking out is PostgreSQL. SQLiteis also worth a look. It's small and embeddable, which means you don't have to hassle with setting up a server.


This article was originally published on Aug 30, 2005
Get the Latest Scoop with Networking Update Newsletter