MySQL, Postfix & Hockey
I've spent a great deal of my time working with some new systems. Basically upgrading some systems, which also means moving away from Apache 1.3, and qmail. That's not such a big deal. I just had to dig into a hodge-podge server to figure out how several admins over time had set things up. There were copies upon copies of everything ... everywhere. I can say that I have somewhat of a clue as to what is going on now. Actually the transition is almost complete. A few more things need to get done.
first things first was to install Kubuntu on the new servers (YAY!). The next step was to run through the apache configuration. Not a whole bunch of changes here. Just a better layout of configuration files. Virtual host mapping seems to work. Made some additions for default hosts into the virtual maps, so _everything_ is just virtual. Then I set up the ftp daemon. It's the typical problems. login doesn't work, login doesn't work, login doesn't work. Finally ask for help .... Aaron tries ... login success! Whatever ... FTP working.
Part of getting all this stuff to work is finding all of the data inside the existing MySQL database. First thing of course was to trie and dump the database, and then play with my own copy. that was a no go :
mysqldump: relocation error: /usr/lib/libmysqlclient.so.10: symbol errno, versio n GLIBC_2.0 not defined in file libc.so.6 with link time referenceWow. That's all Aaron and I had to say. So Aaron mentions a suggestion to me ... I tar up the files in the mysql data directory, and untar them on my computer. Seems I now have the database. Apparently MySQL keeps each database file structure separately and the flat file system can simply be moved at random to another location, and MySQL will read new files it finds ... interesting. The move from MySQL 3 to MySQL 4 had no effect either. I was surprised ... pleasantly surprised.
Now for my list of things I do not like about MySQL. "show tables". That's 9 characters more to type than the equivalent '\d' in PostgreSQL. That may seem like nit picking to you, but the amount of time a day I list the tables to highlight and X-paste a table name multiplies into 900+ extra characters I have typed. "show columns from table
", or slightly better "describe ". At best that is 7 extra characters on this often used command for me. Now I'm up to 1600+ extra characters in a day. Alright ... so maybe I exaggerated on the amount of times I do that sort of thing ... but that's what it seems like. I don't like the vague error messages when something goes wrong. I don't like the privileges system. I don't like the user administration (granting privileges to a non-existent user in order to create that user seems wrong to me). At least "CREATE USER" is available in MySQL 5. I don't like the name either. There ... I'm finished dumping all over MySQL. It's not _that_ bad ... I would choose PostgeSQL over MySQL any day and twice on Sunday. I can still get around the DB in a fairly efficient manner though.
I now got to delve into setting up postfix with MySQL support for virtual mail. Seems like a big task if you have never done that sort of thing before. The postfix configuration for setting that up turned into 7 lines in the configurations. 5 lines were directives to a database cf file. The database config files were stupidly simple to write. There are great examples on the interweb to follow. I started playing and tweaking, sending mail from the laptop to the new server as the relay. tailing the mail logs to see what happens. porting from the old qmail Maildir styles is not a problem at all. Cheers to the postfix developers for being cool and supporting qmail style Maildir setups. I need to make sure the paths have a '/' on the end to specify a directory and not a spool file. Instead of modifying the data in the database (and then having to modify a custom application as well), I just modified the select field options in the postfix config. Making use of CONCAT_WS('/', path, 'Maildir/'). I was quite impressed at how powerful this could be. I did my happy dance and hi-fixes were in order. I had a working virtual mail server, and not mail porting needed to be done, as everything can be set up without mods to the current setup.
Postfix aliases are another story. I had to build a new table, and write a PHP script to shift data into a proper format for it to work. Small changes for email aliases are minor though. I'm happy no major changes to the bulk email would have to be done. I'm going to go back and make sure that as little changes to the DB, and custom application are needed, then try the setup again on the second server. Still need to configure MySQL replication, install clamav, and setup rsync for the home directories ... little things ... but I'm feeling good today.
I guess I'm feeling good because I know that hockey is starting tonight. My Flyers are at home hosting the New York Rangers. It's gonna be a good season. Picked up Forsberg, got some monster de-fence, rock em sock em hockey! Double header on TSN tonight. Calgary vs Minnesota, and Edmonton vs Colorado(?). Should be good times.