QMail Admin

For some reason my vqadmin failed to create a new mail domain?? I know I had some /home permissions problems, but that was quite some time ago, perhaps I haven’t added a domain for mail in that time. Anyway, time to refresh my skills and software.


Home Page

cd /src
wget http://www.inter7.com/vqadmin/vqadmin-2.3.2.tar.gz
tar xvfz vqadmin-2.3.2.tar.gz
cd vqadmin-2.3.2
./configure --enable-cgibindir=/home/vqadmin/cgi-bin --enable-htmldir=/home/vqadmin/www
make && make install-strip
vi /opt/httpd/conf/httpd.include

        deny from all
        Options ExecCGI
        AllowOverride AuthConfig
        Order deny,allow

vi /home/vqadmin/cgi-bin/vqadmin/.htaccess
AuthType Basic
AuthUserFile /home/vqadmin/.passwd
AuthName vQadmin
require valid-user
satisfy any
chown nobody /home/vqadmin/cgi-bin/vqadmin/.htaccess
chmod 644 /home/vqadmin/cgi-bin/vqadmin/.htaccess
htpasswd -bc /home/vqadmin/.passwd admin admin_password
chmod 644 /home/vqadmin/.passwd
apachectl stop
apachectl start

All fixed. For a step by step guide to all Qmail software I recommend http://qmailrocks.org

Linux One Liner – Finding Stuff

Let’s say you created a file in your home directory but can’t work out which directory you put it in.

$ find ~ -name somefile.txt

You can replace ~ (tilda) with a directory e.g. / (slash) for search all locations on your system.

Let’s say you want to find all the JPEG’s you have.

$ find ~ -name "*.jpg"

Now to improve on this, I know I put a JPEG somewhere in the past few days, give me just the files from the past 3 days.

$ find . -name "*.jpg" -mtime -3

And what if you only wanted files greater then 2MB

$ find . -name "*.jpg" -mtime -3 -size +2M

If you want to look at a more detailed listing of the files found, like the format you are familar with using ls, try this.

$ find . -name "*.jpg" -mtime -3 -exec ls -l {} ;

You can find more then files, lets find all the directories you have.

$ find ~ -type d

I haven’t added it, but historically you needed to add -print on the end to print the results, seems nowadays this is optional.

I briefly used the -exec option above, I used it for various purposes. Here are a few.

$ find /backup-location -name "backup.*.tar.gz" -mtime +3 -print -exec rm -f {} ;
$ find . -name CVS -exec rm -rf {} ;

The first I run against my backup directory, that removes the online backups older then 3 days. Of course I’ve also got offline backups.
The second is when I checkout stuff from CVS and I want to prune all the CVS information. NOTE: Using the rm -rf command is very dangerous, you should only use this when you know your stuff. Used in the wrong way you delete everything, if you don’t have backups, there ain’t any UNDO in Linux. Also if you do it as root, you can effectively kill your installation in a split second.

There are other commands that perform various level of finding (e.g. commands via path) and other various stuff. A topic for another time, but to entice you.

$ which find
$ whereis find
$ locate find

Linux One Liner – Parsing long HTML urls

Ever wanted to look at a long HTML URL more easily, say to investigate a parameter. Here is a search from MapQuest.


$ echo "[insert url here]" | | tr "&?" "n"

This produced for the above URL the following output.



The Translate command tr does however replace both the & and ? characters. There are of course many more approaches like.

echo "[insert url here]" | sed -e "s/&/\n/g" -e "s/?/\n/g"

You can easily preserve the & and ? characters extending the syntax with

echo "[insert url here]" | sed -e "s/&/\n&/g" -e "s/?/\n?/g

This produces.



Now don’t get me started with the awk command. One of my popular books is Sed & Awk. If you do any detailed Shell scripting, this is a very handy guide.

Linux One Liner – Security

Here are a few useful one liners for Linux Security. View current packet filtering rules. (i.e. what can and can’t access your computer.

$ iptables -L

On older distros, iptables may not be in place. Try ipchains. A good reference and tools on iptables can be found at www.iptablesrocks.org.

Identity open ports on your installation using the Network exploration tool and security scanner.

$ nmap -p 1-65535 localhost

On my computer this returned

Starting nmap 3.70 ( http://www.insecure.org/nmap/ ) at 2006-06-11 12:22 EST
Interesting ports on lamda.arabx (
(The 65525 ports scanned but not shown below are in state: closed)
22/tcp open ssh
25/tcp open smtp
111/tcp open rpcbind
139/tcp open netbios-ssn
445/tcp open microsoft-ds
631/tcp open ipp
901/tcp open samba-swat
8005/tcp open unknown
32769/tcp open unknown
34315/tcp open unknown

That’s a cause for a bit of concern. Will need to look into that more.

Looking into more detail, I know what runs samba-swat but let’s confirm.

$ fuser -n tcp 901

This provides a confirmation and the Process id of the process using this port. A more susync output would be.

$ ps -ef | grep `fuser -n tcp 901 | tail -1 | cut -d: -f2` | grep -v grep

This gives me.

root 3356 1 0 Jun10 ? 00:00:00 xinetd -stayalive -pidfile /var/run/xinetd.pid

Which is exactly right, Samba Swat (the web interface for Samba) which you access at http://localhost:901 is configured using xinetd.

Now to investigate some ports I didn’t know were open.

Linux One Liner – Using the manual

For users of Linux regardless of the skill level, using the OS manual is invaluable. Frank gives an example using crontab at Viewing a specific version of a man page, but as with Linux there is always more then one way to skin a cat.

To view a man page of a command e.g. du.

$ man du

The Unix Manual is generally broken down into 9 sections, and sometimes a manual page is in multiple sections. These section are:

  • Section 1 – Commands
  • Section 2 – System Calls
  • Section 3 – Library Calls
  • Section 4 – Special Files
  • Section 5 – File Formats and Conversions
  • Section 6 – Games for Linux
  • Section 7 – Macro Packages and Conventions
  • Section 8 – System Management Commands
  • Section 9 – Kernel Routines

As in Franks example, crontab is in both Section 1 and 5. Crontab tab the Linux Command, and the file format used for crontab. To get access to the later.

$ man -s 5 crontab

Frank made reference to a syntax of man crontab.5 which didn’t work in my distro, so again, different implementations may be possible.

Say you remember the command associated with cron but not the full name. You can search the man pages with.

$ man -k cron

This produced in my distro.

/etc/anacrontab [anacrontab] (5) - configuration file for anacron
anacron (8) - runs commands periodically
cron (8) - daemon to execute scheduled commands (ISC Cron V4.1)
crontab (1) - maintain crontab files for individual users (ISC Cron V4.1)
crontab (5) - tables for driving cron (ISC Cron V4.1)
hinotes (1) - Syncronize your Hi-Notes database with your desktop machine. Hi-Notes must be installed on your Palm handheld (and at least one entry must exist within Hi-Notes)
read-todos (1) - Syncronize your Palm ToDo application's database with your desktop machine

Of course you should not discount that a manual page exists for the man command.

$ man man

Linux One Liner – Calculating Used Diskspace

You can easily see the state of diskspace used with the command.

$ df

However, often you want to know where most of the diskspace is being taken. A high level summary can be performed with.

$ du -k -s /* | sort +0nr -1

Producing results like.

23450208        share
9369212 home
3803504 usr
2395876 var
2015380 opt
920121  proc
815476  src

A more indepth review of the worst offending directories can be done with.

$ du -k / | sort +0nr -1 | head -30

This view does however show all offending directories so you normally have to ignore the higher levels as the are inclusive of the more specific directories where the most diskspace is.

You get a result like

47642425        /
23450208        /share
9799580 /home
9153228 /home/rbradfor
8497152 /share/bittorrent
7065840 /share/bittorrent/Stargate.SG-1.Season.9
4986368 /home/rbradfor/vmplayer
4837136 /usr
3659200 /opt
2559836 /home/rbradfor/vmplayer/ultimateLAMP
2447692 /var
2426364 /home/rbradfor/vmplayer/ultimateLAMP-0.1
2377732 /usr/lib
2335428 /var/lib
2213440 /var/lib/vmware
2213432 /var/lib/vmware/Virtual Machines
2174928 /share/lib
2174912 /share/lib/vmware
2174896 /share/lib/vmware/Virtual Machines
1972900 /home/rbradfor/download
1945576 /var/lib/vmware/Virtual Machines/XP Pro Dell 5150
1868016 /share/UltimateLAMP
1604032 /usr/share


  • df – report filesystem disk space usage
  • du – estimate file space usage
  • sort – sort lines of text files

A better VNC

I’ve been using VNCViewer from RealVNC under Linux to remote connect to an older machine running windows. Two reasons, I don’t need yet another screen on my desk, and I need windows to adequately test and use the MySQL GUI products, in particular MySQL Workbench.

I never realised there was a better way, particularly over a local network, a command called rdesktop which is capable of natively speaking Remote Desktop Protocol (RDP).

$ su -
$ yum install rdesktop

This did only give me version 1.3.1. The current version 1.4.1 available from the rdesktop Website does provide greater commands including the syntax I use.

su -
cd /src
wget http://optusnet.dl.sourceforge.net/sourceforge/rdesktop/rdesktop-1.4.1.tar.gz
tar xvfz rdesktop-1.4.1.tar.gz
cd rdesktop-1.4.1
make install

Example Usage

$ rdesktop -u <username> -p <password> -K -N -z -a 16 -x b -P 

Some additional common options include -d <domain> and -f for fullscreen.

Comand Syntax

$ rdesktop
rdesktop: A Remote Desktop Protocol client.
Version 1.4.1. Copyright (C) 1999-2005 Matt Chapman.
See http://www.rdesktop.org/ for more information.

Usage: rdesktop [options] server[:port]
   -u: user name
   -d: domain
   -s: shell
   -c: working directory
   -p: password (- to prompt)
   -n: client hostname
   -k: keyboard layout on server (en-us, de, sv, etc.)
   -g: desktop geometry (WxH)
   -f: full-screen mode
   -b: force bitmap updates
   -L: local codepage
   -B: use BackingStore of X-server (if available)
   -e: disable encryption (French TS)
   -E: disable encryption from client to server
   -m: do not send motion events
   -C: use private colour map
   -D: hide window manager decorations
   -K: keep window manager key bindings
   -S: caption button size (single application mode)
   -T: window title
   -N: enable numlock syncronization
   -X: embed into another window with a given id.
   -a: connection colour depth
   -z: enable rdp compression
   -x: RDP5 experience (m[odem 28.8], b[roadband], l[an] or hex nr.)
   -P: use persistent bitmap caching
   -r: enable specified device redirection (this flag can be repeated)
         '-r comport:COM1=/dev/ttyS0': enable serial redirection of /dev/ttyS0 to COM1
             or      COM1=/dev/ttyS0,COM2=/dev/ttyS1
         '-r disk:floppy=/mnt/floppy': enable redirection of /mnt/floppy to 'floppy' share
             or   'floppy=/mnt/floppy,cdrom=/mnt/cdrom'
         '-r clientname=': Set the client name displayed
             for redirected disks
         '-r lptport:LPT1=/dev/lp0': enable parallel redirection of /dev/lp0 to LPT1
             or      LPT1=/dev/lp0,LPT2=/dev/lp1
         '-r printer:mydeskjet': enable printer redirection
             or      mydeskjet="HP LaserJet IIIP" to enter server driver as well
         '-r sound:[local|off|remote]': enable sound redirection
                     remote would leave sound on server
   -0: attach to console
   -4: use RDP version 4
   -5: use RDP version 5 (default)

I haven’t reviewed the security implications but considering I’m only running in my own internal network, it’s not a major priority.


Installing a new USB External Drive

I’ve decide to move from CentOS to Ubuntu as the Linux Distro on my laptop, so it was time to do a full backup to a new USB external drive.

I got a new Maxtor 300G 7200rpm ATA133 (16MB cache) HDD from Umart for AUD$149. I already had an unused USB 2.0 3.5″ external casing.

My first issue was, I couldn’t detect the new drive from my laptop. Switching to another desktop running CentOS, I got the following errors.

$ tail -f /var/log/messages
May  6 12:36:53 marvin kernel: usb 1-1: new full speed USB device using address 4
May  6 12:36:57 marvin kernel: SCSI subsystem initialized
May  6 12:36:57 marvin kernel: Initializing USB Mass Storage driver...
May  6 12:36:57 marvin kernel: scsi0 : SCSI emulation for USB Mass Storage devices
May  6 12:36:57 marvin kernel:   Vendor: Genesys   Model: USB to IDE Disk   Rev: 0033
May  6 12:36:57 marvin kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
May  6 12:36:57 marvin kernel: usbcore: registered new driver usb-storage
May  6 12:36:57 marvin kernel: USB Mass Storage support registered.
May  6 12:36:58 marvin scsi.agent[3573]: disk at /devices/pci0000:00/0000:00:07.2/usb1/1-1/1-1:1.0/host0/target0:0:0/0:0:0:0
May  6 12:36:59 marvin kernel: usb 1-1: USB disconnect, address 4
May  6 12:36:59 marvin kernel: sda : READ CAPACITY failed.
May  6 12:36:59 marvin kernel: sda : status=0, message=00, host=1, driver=00
May  6 12:36:59 marvin kernel: sda : sense not available.
May  6 12:36:59 marvin kernel: sda: Write Protect is off
May  6 12:36:59 marvin kernel: sda: assuming drive cache: write through
May  6 12:37:00 marvin kernel: sda : READ CAPACITY failed.
May  6 12:37:00 marvin kernel: sda : status=0, message=00, host=1, driver=00
May  6 12:37:00 marvin kernel: sda : sense not available.
May  6 12:37:00 marvin kernel: sda: Write Protect is off
May  6 12:37:00 marvin kernel: sda: assuming drive cache: write through
May  6 12:37:00 marvin kernel: sda : READ CAPACITY failed.
May  6 12:37:00 marvin kernel: sda : status=0, message=00, host=1, driver=00
May  6 12:37:00 marvin kernel: sda : sense not available.
May  6 12:37:00 marvin kernel: sda: Write Protect is off
May  6 12:37:00 marvin kernel: sda: assuming drive cache: write through
May  6 12:37:00 marvin kernel:  sda:<3>scsi0 (0:0): rejecting I/O to device being removed
May  6 12:37:00 marvin kernel: Buffer I/O error on device sda, logical block 0
May  6 12:37:00 marvin kernel: scsi0 (0:0): rejecting I/O to device being removed
May  6 12:37:00 marvin kernel: Buffer I/O error on device sda, logical block 0
May  6 12:37:01 marvin kernel: scsi0 (0:0): rejecting I/O to device being removed
May  6 12:37:01 marvin kernel: Buffer I/O error on device sda, logical block 262143
May  6 12:37:01 marvin kernel: scsi0 (0:0): rejecting I/O to device being removed
May  6 12:37:01 marvin kernel: Buffer I/O error on device sda, logical block 262143
May  6 12:37:01 marvin kernel: scsi0 (0:0): rejecting I/O to device being removed
May  6 12:37:01 marvin kernel: Buffer I/O error on device sda, logical block 0
May  6 12:37:01 marvin kernel:  unable to read partition table
May  6 12:37:01 marvin kernel:  sda:<3>scsi0 (0:0): rejecting I/O to device being removed
May  6 12:37:01 marvin kernel: Buffer I/O error on device sda, logical block 0
May  6 12:37:01 marvin kernel: scsi0 (0:0): rejecting I/O to device being removed
May  6 12:37:01 marvin kernel: Buffer I/O error on device sda, logical block 262143
May  6 12:37:01 marvin kernel: scsi0 (0:0): rejecting I/O to device being removed
May  6 12:37:01 marvin kernel: Buffer I/O error on device sda, logical block 0
May  6 12:37:01 marvin kernel:  unable to read partition table
May  6 12:37:01 marvin kernel: Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0

So, thinking it may be the pin switches, I unscrewed everything to change the pin selector from Cable Select to Master. Trying again, with the bare disk and just the connectors, I confirmed this was the issue. This is what one should expect.

May  6 13:00:28 marvin kernel: usb 1-1: new full speed USB device using address 6
May  6 13:00:29 marvin kernel: scsi2 : SCSI emulation for USB Mass Storage devices
May  6 13:00:29 marvin kernel:   Vendor: Genesys   Model: USB to IDE Disk   Rev: 0033
May  6 13:00:29 marvin kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
May  6 13:00:29 marvin kernel: SCSI device sda: 586114704 512-byte hdwr sectors (300091 MB)
May  6 13:00:29 marvin kernel: sda: test WP failed, assume Write Enabled
May  6 13:00:29 marvin kernel: sda: assuming drive cache: write through
May  6 13:00:29 marvin kernel:  sda: unknown partition table
May  6 13:00:29 marvin kernel: Attached scsi removable disk sda at scsi2, channel 0, id 0, lun 0
May  6 13:00:30 marvin scsi.agent[4172]: disk at /devices/pci0000:00/0000:00:07.2/usb1/1-1/1-1:1.0/host2/target2:0:0/2:0:0:0

So working with /dev/sda which was expected, sd being for the USB connections, and a for the first.

Double check nothing on drive.

$ fdisk -l /dev/sda

Disk /dev/sda: 300.0 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sda doesn't contain a valid partition table


Partition the drive into 3 x 100GB partitions.

$ fdisk /dev/sda
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

The number of cylinders for this disk is set to 36483.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): p

Disk /dev/sda: 300.0 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
Partition number (1-4): 1
First cylinder (1-36483, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-36483, default 36483): +100000M

Command (m for help): p

Disk /dev/sda: 300.0 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       12159    97667136   83  Linux

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
Partition number (1-4): 2
First cylinder (12160-36483, default 12160):
Using default value 12160
Last cylinder or +size or +sizeM or +sizeK (12160-36483, default 36483): +100000M

Command (m for help): p

Disk /dev/sda: 300.0 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       12159    97667136   83  Linux
/dev/sda2           12160       24318    97667167+  83  Linux

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
Partition number (1-4): 3
First cylinder (24319-36483, default 24319):
Using default value 24319
Last cylinder or +size or +sizeM or +sizeK (24319-36483, default 36483):
Using default value 36483

Command (m for help): p

Disk /dev/sda: 300.0 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       12159    97667136   83  Linux
/dev/sda2           12160       24318    97667167+  83  Linux
/dev/sda3           24319       36483    97715362+  83  Linux

Command (m for help): v
15371 unallocated sectors

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.


$ fdisk -l /dev/sda

Disk /dev/sda: 300.0 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       12159    97667136   83  Linux
/dev/sda2           12160       24318    97667167+  83  Linux
/dev/sda3           24319       36483    97715362+  83  Linux


Formating the 3 new Partitions. (Note: this takes a while)

$ mkfs.ext3 -v /dev/sda1
$ mkfs.ext3 -v /dev/sda2
$ mkfs.ext3 -v /dev/sda3


Create some mount points and test mount.

$ mkdir /u11
$ mkdir /u12
$ mkdir /u13
$ mount -t ext3 /dev/sda1 /u11
$ mount -t ext3 /dev/sda2 /u12
$ mount -t ext3 /dev/sda3 /u13

Add hard disk to fstab

Hacking MySQL Source (in a good way)

HackFest B: Creating a New SHOW Command by Brian Aker at the MySQL Users Conference

Brian stepped through the steps for those attending to modify and deploy new functionality in the mysql server. Cool. The end result I would consider for an experienced developer as relatively easy (after avoiding the pitfalls).

NOTE: I wasn’t able to complete this successfully during the session, but I’ve posted this, so hopefully the input and review of others can help in overcoming the current issues. See Outstanding Issues throughout my notes.

Our goal: Produce a new command SHOW CONFERENCE;

The following commands were performed on CentOS 4.2. There may be some differences with different Linux Distros.

Prepare a current Source Code Tree

su -
useradd mysqldev
su - mysqldev
wget http://downloads.mysql.com/snapshots/mysql-5.1/mysql-5.1.10-beta-nightly-20060426.tar.gz
# NOTE: You should check the snapshots page for latest versions http://downloads.mysql.com/snapshots.php
tar xvfz mysql-5.1.10-beta-nightly-20060413.tar.gz
cd mysql-5.1.10-beta-nightly-20060413
# compile script will depend on H/W and requirements
./BUILD/compile-pentium-debug --prefix=/home/mysqldev
make install
scripts/mysql_install_db --datadir=/home/mysqldev/data
sql/mysqld --basedir=/home/mysqldev --datadir=/home/mysqldev/data &

NOTE: This can take a while, so it’s a good opportunity to leave this and come back at a later time. The –prefix allows you to install into the new users directory ensuring that you can test without affecting any currently installed mysql installations on your machine.

The BUILD directory contains many different compilations for platforms and variants. This version contains 41 specific scripts. For the purpose of our new SHOW command, we are going to run in debug mode for any necessary debugging.

Outstanding Issues

  • I was surprised a make install didn’t configure the bin/mysqld and scripts/mysql_install_db as you would get in a binary distribution. There is probably additional commands necessary for this, but for the purpose of development it works.
  • I run multiple versions of MySQL on my machine, and I had some conflict with my /etc/my.cnf file, so I just removed it for the purpose of this test. There needs to be a cleaner way to ensure this isn’t used, and also to compartmentalise/isolate different source trees.

Confirm Installation

I ran this in a seperate terminal window.

su - mysqldev
bin/mysql -e "SELECT VERSION()"
| VERSION()                          |
| 5.1.10-beta-nightly-20060413-debug |

This gives us a suitable source baseline.

Implementing a new SHOW Command

The easiest means of developing a new SHOW command is to base this on an existing command. We are going to base this new SHOW command on the SHOW AUTHORS command.

We are going to be looking at the following files.

  1. lex.h
  2. sql_yacc.yy
  3. sql_lex.h
  4. sql_parse.cc
  5. mysql_priv.h
  6. sql_show.cc

All these files are found under the sql directory in the source tree.


131:     { "CONFERENCE",       SYM(CONFERENCE_SYM)},


 202:  %token  CONFERENCE_SYM
8267:       | CONFERENCE_SYM
8268:         {
8269:           LEX *lex=Lex;
8270:           lex->sql_command= SQLCOM_SHOW_CONFERENCE;
8271:         }
9366:       | CONFERENCE_SYM        {}




3516:     res= mysqld_show_conference(thd);
3517:     break;


915: bool mysqld_show_conference(THD *thd);


229: bool mysqld_show_conference(THD *thd)
230: {
231:   List<item> field_list;
232:   Protocol *protocol= thd->protocol;
233:   DBUG_ENTER("mysqld_show_conference");
235:   field_list.push_back(new Item_empty_string("Name",100));
237:   if (protocol->send_fields(&field_list,
238:                             Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
241:   protocol->prepare_for_resend();
242:   protocol->store("Welcome to the MySQL User Conference 2006", system_charset_info);
243:   if (protocol->write())
245:   send_eof(thd);
247: }

cd ..
./BUILD/compile-pentium-debug --prefix=/home/mysqldev
gmake[3]: *** Waiting for unfinished jobs....
/bin/chmod +x mysql-test-run-t
/bin/mv mysql-test-run-t mysql-test-run
gmake[3]: Leaving directory `/home/mysqldev/mysql-5.1.10-beta-nightly-20060413/mysql-test'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/home/mysqldev/mysql-5.1.10-beta-nightly-20060413/mysql-test'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/home/mysqldev/mysql-5.1.10-beta-nightly-20060413'
gmake: *** [all] Error 2

Outstanding Issues

  • I’m sure there must be a more effecient means of compiling changes, this process effectively cleaned and started again.
  • I had a build failure which didn’t seem to make any sense.

At this point I wasn’t able to continue, but here are notes I took of next steps.

make install
gdb mysqld
run --gdb --debug

In another terminal session.

su - mysqldev

I’m keen to see it work in my own environment and documented for others to try.

Brian moved on to creating a INFORMATION_SCHEMA query but we ran out of time to complete this. I’ve got some notes to document as a later date.

Installing MySQL 5 via rpm

I don’t think I’ve ever installed MySQL via .rpm I have always installed via .tar.gz primarilarly because I’m an /opt system administrator from my old UNIX days. so my first experience installing on my CentOS 4.2 (aka RHEL 4).

$ rpm -Uvh MySQL-server-standard-5.0.19-0.rhel4.i386.rpm
warning: MySQL-server-standard-5.0.19-0.rhel4.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
error: Failed dependencies:
perl(DBI) is needed by MySQL-server-standard-5.0.19-0.rhel4.i386
Suggested resolutions:
$ rpm --import /usr/share/doc/centos-release-4/RPM-GPG-KEY
$ yum install perl-DBI-1.40-8
$ rpm -Uvh MySQL-server-standard-5.0.19-0.rhel4.i386.rpm
warning: MySQL-server-standard-5.0.19-0.rhel4.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
Preparing... ########################################### [100%]
1:MySQL-server-standard ########################################### [100%]
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h lamda.arabx password 'new-password'
See the manual for more instructions.
Please report any problems with the /usr/bin/mysqlbug script!
The latest information about MySQL is available on the web at


Support MySQL by buying support/licenses at https://order.mysql.com
Starting MySQL...................................[FAILED]

Failed!!! What the!!!!

So turn to my good friend Morgan for help. I'd already done a little google research, but it took Morgan about 15 secs to know the problem, and know he had already experienced this with other clients.

Some References:

Some Analysis:

$ system-config-securitylevel
# shows that I have SELinux enabled.
$ /usr/sbin/selinuxenabled && echo "yes"
$ restorecon -R -v /var/lib

Ok, its working now. But wait there is no mysql command? Again, I'm .tar.gz user, had to realise the client is a seperate RPM.

rpm -ivh MySQL-client-standard-5.0.19-0.rhel4.i386.rpm

Well my first .rpm experience was, well eventful none the same.

A Basic MySQL Developer Installation

Given a new Linux Installation, the following is my recommendation for installation of MySQL for a experienced software developer giving flexibility in a development environment.

1. Under normal circumstances, most distros include MySQL either in a default server installation or on the distribution CD’s. You should first ensure MySQL is not installed.

2. All products can be downloaded from the MySQL Downloads page.

3. Download MySQL 5.1 Beta – Linux (non RPM, Intel C/C++ compiled, glibc-2.3), this product is close to production release and stable. This also includes both Server and Client as well as provides flexibility in installation location and multiple installations.

3. Download MySQL Administrator 1.1.6.

4. Download MySQL Query Browser 1.1.18.

5. Download MySQL 5.1 Manual


su -
groupadd mysql
useradd -g mysql mysql
cd /opt
tar xvfz mysql-5.1.7-beta-linux-i686-icc-glibc23.tar.gz
ln -s mysql-5.1.7-beta-linux-i686-icc-glibc23 mysql
tar xvfz mysql-administrator-1.1.6-linux-i386.tar.gz
tar xvfz mysql-query-browser-1.1.18-linux-i386.tar.gz
tar xvfz refman-5.1-en.html-chapter.tar.gz
mv html-chapter mysql-manual-5.1
cd mysql
echo "[mysqld]
port=3306" > my.cnf
cd /opt
chown -R root /opt/mysql
chown -R mysql /opt/mysql/data
chgrp -R mysql /opt/mysql
chown -R root /opt/mysql/bin
cd /opt/mysql
./bin/mysqld_safe &
./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h `hostname` -pnew-password password 'new-password'
./bin/mysqladmin -pnew-password shutdown
echo "PATH=/opt/mysql/bin:/opt/mysql-administrator/bin:/opt/mysql-query-browser/bin:$PATH; export PATH" > /etc/profile.d/mysql.sh
. /etc/profile.d/mysql.sh   # Just for this session
cp support-files/mysql.server /etc/rc.d/init.d
chkconfig mysql.server on


The MySQL server will start automatically on System boot

To run the MySQL Client

mysql -uroot -pnew-password mysql

To run the MySQL Administrator


To run the MySQL Query Browser


Now that I remember all this, perhaps RPM’s are the way to go, I just don’t like the structure in deployed files.

What should I install?

I was asked a simple question today by a collegue who is an experiened Java Developer and Oracle user and had just installed SUSE on his personal laptop, to align closer with his work environment. What MySQL should I install, the MySQL web site has this and this and this?

Simple question, but the answer isn’t as simple, especially when MySQL now has a number of different products encompassing client functionality in addition to the MySQL server.

Oracle got it right with the latest edition Oracle 10g Express Edition (XE). A simple one rpm install that includes the Oracle Server, Oracle client, a Web Based Administrator, Query Tool and Application Development tool. I guess as we are all experienced, the simple question isn’t something we have a some notes on handy, hence the purpose of my entry A Basic MySQL Developer Installation. NOTE: This is for a developer environment, installation would be simplier using RPM’s for a compatible Distro.

On that note, It would be good for MySQL to provide a more complete installation of it’s suite of products rather then letting 3rd parties package it all together. Problem is there are so many possible combinations, what do you do.

Format new Linux Disk

fdisk /dev/hdb
mkfs.ext3 /dev/hdb1
mkdir /u03
mount -t ext3 /dev/hdb1 /u03
ls /u03
umount /u03
vi /etc/fstab
mount /u03

Another dissappointing MySQL article

Another slightly disappointing article regarding MySQL, this one from a printed magazine. Below are my comments to the editor of Linux Format. The Dear Editor is an email link should others wish to make any comments. (Previous article comments What makes your blood boil?, Review of Database Magazine Article – “The Usual Suspects”)

Dear Editor,

I’ve recently subscribed to LXF, and have generally been very happy with the content in past months. I’m disappointed in your recent LXF77 article “Harness a database” Pg 57. Being a strong MySQL supporter, your article includes a number of practices which are less then ideal, and especially for the newly initiated, overly complicated when simplier alternatives exist.

I am happy to see that you had the current version 5.0.18. However in 7 years of using MySQL I’ve never had to compile from source, a binary has always been available, yet in your article you take the compile from source approach. While you may have done this to appease all possible readers of all POSIX variants, the binary for at least Linux could have been included.

In addition, much like your earlier article for Samba where you make reference to “most distros include this”, indeed MySQL is also included in most popular Linux distros.

You could have also made reference to the MySQL downloads area website. Infact, the MySQL 5.0 download area provides some 70+ dedicated distro versions for optimal usage. The site also states “For maximum stability and performance, we recommend that you use the binaries we provide.”

The second point that I do believe is completely unnecessary, and not recommended by MySQL, is the manual creation of user security. MySQL provides the CREATE USER command to achieve this. In your article, you would execute CREATE USER [email protected] IDENTIFIED BY ‘orangutan'; rather then an INSERT INTO user and a FLUSH PRIVILEGES.

Throughout your article you make no reference to the MySQL website, perhaps this is a policy, however it’s always ideal to have online references. At worst, a link to say www.linuxformat.co.uk/products/mysql (or appropiate) that provides links to the product information, in this case MySQL. This will allow you to undertake your necessary advertising, as well as track traffic.

I’m also sure, that contacting the MySQL Community Relations Manager for review of any MySQL content in future would be openly accepted, I’m even happy to review MySQL content in your magazine.

dbus messaging error under CentOS 4.2

The Problem
I’ve been getting the following /var/log/messages errors:

Mar 13 21:38:42 lamda dbus: Can't send to audit system: USER_AVC pid=3606 uid=81 loginuid=-1 message=avc: denied { send_msg } for scontext=user_u:system_r:unconfined_t tcontext=user_u:system_r:initrc_t tclass=dbus
Mar 13 21:39:17 lamda last message repeated 7 times

Based on the command dbus-launch – Utility to start a message bus from a shell script. Investigation found the process running under my userid, not root?

rbradfor 5760 1 0 Mar11 tty1 00:00:00 /usr/bin/dbus-launch --exit-with-session /etc/X11/xinit/Xclients
rbradfor 5761 1 0 Mar11 ? 00:00:00 dbus-daemon-1 --fork --print-pid 8 --print-address 6 --session

The service can be stopped which addresses the immediate problem.

/etc/init.d/messagebus stop

The Fix

$ wget ftp://people.redhat.com/dwalsh/SELinux/RHEL4/u3/noarch/selinux-policy-targeted-1.17.30-2.126.noarch.rpm
$ wget ftp://people.redhat.com/dwalsh/SELinux/RHEL4/u3/i386/policycoreutils-1.18.1-4.9.i386.rpm
$ rpm -Uvh policycoreutils-1.18.1-4.9.i386.rpm selinux-policy-targeted-1.17.30-2.126.noarch.rpm

CentOS 4 Forum Reference

JMeter – Performance Testing Software

Apache JMeter is a 100% pure Java desktop application designed to load test functional behavior and measure performance. It was originally designed for testing Web Applications but has since expanded to other test functions. Specifically it provides complete support for database testing via JDBC.

Some References: Homepage http://jakarta.apache.org/jmeter/  ·  Wiki Page  ·  User Manual

Initial Installation Steps

$ su -
$ cd /opt
$ wget http://apache.planetmirror.com.au/dist/jakarta/jmeter/binaries/jakarta-jmeter-2.1.1.tgz
$ wget http://apache.planetmirror.com.au/dist/jakarta/jmeter/source/jakarta-jmeter-2.1.1_src.tgz
$ tar xvfz jakarta-jmeter-2.1.1.tgz
$ tar xvfz jakarta-jmeter-2.1.1_src.tgz
$ ln -s jakarta-jmeter-2.1.1 jmeter
$ echo "PATH=/opt/jmeter/bin:$PATH;export PATH" > /etc/profile.d/jmeter.sh
$ . /etc/profile.d/jmeter.sh
$ jmeter &

Adding MySQL Support

cd /tmp
wget http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-3.1.12.tar.gz/from/http://mysql.planetmirror.com/
tar xvfz mysql-connector-java-3.1.12.tar.gz
cp mysql-connector-java-3.1.12/mysql-connector-java-3.1.12-bin.jar /opt/jakarta-jmeter-2.1.1/lib/

Steps to perform simple MySQL JDBC Test.

1. Launch JMeter
2. Add a new Thread Group (using right click)
3. Define Thread Settings (no messing around 3 threads x 1000 iterations)
4. Add a Sampler JDBC Request
5. Add initial sample SQL query
6. Add a JDBC Connection Configuration
7. Define JDBC Connnection details (I’m using the sakila sample database at this time)
8. Define a Results View
9. Run the sucker

This is just a quick intro to prove it all works, There are quite a lot of reporting output possible, something for my next post.
Click on Image for a larger view.

Latest MySQL Versions under VMWare

I made reference previously to Testing/Trialing new MySQL Releases using VMWare.

Well, I’ve just about completed my own Image for the lastest MySQL 5.0 (given I’m now running MySQL 5.1). I’m interested in sharing my experiences, and even providing some images for users if there is any demand out there.

What I’ve decided on is to use the VMWare supplied Browser Appliance which is Ubuntu 5.10. The great thing is the image autoboots into graphical mode, auto logins and loads a browser. My goal now is to get a suitable startup page describing the MySQL environment, links, manual etc.

The only requirements to run would be the Free VMware Player and a latest image.

I’m looking at providing a FTP and RSYNC download. Those savvy people will benefit a lot more from RSYNC when the image is upto 500MB.

I’m interested to know if anybody else would use this with the lastest 5.0, 5.1, 5.2 etc versions. Also, would it be of benefit to include other MySQL products such as Query Browser, Administrator, Workbench.

Oracle Comments

Some recent posts regarding Oracle (See Smart moves by MySQL AB and Larry Ellison still doesn’t understand open source) leads me to put in my 2 cents worth.

My background I’m sure like a lot of experienced MySQL people is in Oracle, and indeed in Ingres before that (starting in 1988). I have also worked for a number of years at Oracle Corporation. Ironically I started as their resident Ingres Specialist, in an international research project of DMS (Design & Migration Services) of re-engineering Ingres applications into an Oracle Designer Repository some 10 years ago in 1996. I of course moved into a number of other Oracle roles for clients following that. I still retain some contacts around the place.

It’s obvious Larry’s goal is to become more “Open Source”. This is of course a complex topic, and you can’t just say it like this. I’ll leave that for another day, but I’ve got some opinion on current trends.

It’s clear from recent purchases of JBoss, and SleepCat (Berkley DB) that Oracle has an intention of providing a suitable technology stack in a number of vertical marketspaces that Oracle presently cannot. For example, in the embedded space. Purchasing provides a much quicker solution, and also provides a different way to solve the problem instead of the legacy Oracle Product line. I haven’t seen any recent press, but I know that Xen was also in Oracle’s wallet space.

I would suspect that Oracle will move to providing a Stack solution (akin to SpikeSource for example) in a number of vertical spaces. These stacks will include non-traditional but now owner Oracle products, including Berkeley DB in lower end solutions. This along with the recent Oracle Express Edition (XE) free offering will enable Oracle to target market’s that were previously unavailable.

This is clearly not for a financial intention. There is no way to obtain a return on investment, however it’s all about upselling. By providing these offerings, Oracle now has a large marketplace to promote commercial product offerings.

Assuming, Oracle goes down this path, I’d assume they will also provide clear migration paths between stack offerings, as part of upselling. This will be more complex to achieve. I also suspect that Oracle will move towards a better Web 2.0 model, by providing products are no cost, but provide a service to support and maintain in these new marketspaces.

In closing, why did Oracle purchase InnoBase, the creators of the MySQL InnoDB Storage Engine? This question seems still unanswered. It doesn’t fit easily into the above ideas of differing technology stacks. Ultimately, money buys power, and I suspect it was just that, with no real future intentions or clear plan.

Thanks for the comment about JBoss, yes, it’s not official, nor is Xen, but it took Oracle I think 15 months to get Peoplesoft.

I came across the Oracle Corporation Wikipedia entry in other work, the end of the history page reads a who’s who of acquisitions.


We all know Tux as the Linux penguin, and those that know me, understand how much I hate Microsoft, and that my core logo, as shown down the right of my blog with Windows Sucks is what I preach. Well I’ve now had this made into a logo on tee-shirts.

As part of searching for images, I’ve come across a few alternative images that I really like, Tux and the BSD demon, Tux and the loosing Windows and MSN logo. You can find more of my collected works at Tux Images

MySQL Workbench 1.0.1 First Impressions

These are my first impressions of MySQL WorkBench 1.0.1. Rant and rave you may say, but a new user, or an experienced modeller would probably observe these points. Also, given that (with a poll?) I suspect a good number of users will be previous DBDesigner users, some level of functionality that may not be considered initially in a new product, should be considered for this migration path of legacy users.

I’ll take the time to review the Forums adding my points, and review Bug System but for now, just blogging is easier.


Note: Generally a conclusion is at the bottom, but I’d suspect most readers will switch off quickly, I wanted to catch the gaze in the first few secs.

In summary, I’ve just scratched the surface, I’d do a more fuller QA review and testing, but I’m not certain yet of the best feedback loops, and whether it’s warranted. A lot of what I’ve said may already be known internally. I don’t want to sound petty, but I would not like to reference this as a 1.0 product, it’s got some way to go to being both stable, consistent, and complete in a basic level of functionality. In addition, the MySQL Website 5.0 page speal lists MySQL Workbench as a 5.0 product, I think this is a little inaccurate.

This product appears to have a sound start, but it’s a long way from me considering moving from DBDesigner, which is a real shame, as I’ve been waiting now probably 8 months to get my hands on this (and loose some annoying bugs in the now unsupported DBDesigner), and I’m desperately wanting to get support for MySQL 5 re-engineering.

Main View

After startup you are presented with the MySQL Gui Window, which consists of a number of elements, the menu line, the toolbars (horizantial and vertical), the Main View, and some tab views (shown on right side).
Main View

  • You can’t double click on a table to get into edit mode. You must choose the pencil (bottom left corner of table). When you have a table with 30+ columns, this involves some more scrolling, particularly depending on your view magnification, if you start by finding the table first in a large 150+ table model.
  • While the display of the different elements within a table is nice (e.g. Columns, Indicies, foreign keys etc), when I’ve got 150+ tables in my diagram I don’t want to see this verbose information. I’d like to see a user option of cut down views, removing this headings, display/hide indicies,foreign keys, triggers.
  • What does the lock icon do, and the other bottom right icon, there seems to be no feedback as to what they do?
  • What does the other icon do (not pencil, not lock), again appears to be no feedback?
  • I don’t see a snap to grid? I also don’t see anyway to adjust the size of the grid.
  • I see in the Schema window, the hopeful ability to reference multiple schemas (unclear of the full benefit here), but for now I see no clear way to create then one. Given this, when you select the Table Tool in the Tool Options you get a drop down box for schema. How do you create multiple schemas? Should you in one diagram? If you only have one defined, the drop box should not be present.
  • Tool Options shows 3 colors, that’s nice, however how do you move to selecting more? The color only highlights the table name in the Main View. I’d like to see a background color for all tables. Again in 150+ tables, color coding tables from modules makes it easier to see them, the heading is not enough.
  • You can color a table when creating, but there is no ability to edit the color at a later time?
  • After creating two tables both with Primary Keys, I tried to create a relationship between both, using all 3 relationship options. While I could select the source table, I couldn’t select the destination table in any way. (click, double click, etc)
  • Creating a view with the View tool, provides the iconic buttons in the top section of layout, different to the table layout. It should be consistent.
  • The View Tool, allows you to enter SQL for the view, that’s nice, but it should be displayed on the Data Model. The Data Model’s responsibility is to show tables, columns and relationships. It should show table names, column names (in the case of ‘*’, I think it should probably show ‘*’, not expanded columns due to the complexity.
  • I created a table with an INT(11), VARCHAR(40) and X (which becomes X(0), se Table Editor points). In the resultant Main View, I get INT,VARCHAR and X((0)) as the column definitions. There is no consistency here.
  • I would like to see the capability of removing data types from the display within tables. In a more structured environment, you would first start with a logical model, then move to a physical model, or in early design, you are just defining the probably attributes of table, before they become columns. The datatype isn’t determined, so just listing names, and icon (key,mandatory) is all that’s required.

Schema Tab

  • With my long list of tables, I would like to be able to quickly go from the table in this view to the table in the Main View. (Previously DBDesigner provided a double click to achieve this).
  • I understand that the ordering of categories within the database is alphabetical, but it should be in priority order (Table,View,Routine…). Two reasons, this is the likely creation process, you create tables first, and second, for any schema management prior to 5, the other 3 aren’t relevent.
  • With the previous point, I don’t see any compatibility management for MySQL versions. While there are two many subtle changes to warrent a great deal of work, a simply compatibility of 4.0, 4.1, 5.0, 5.1 would clearly provide when in a 4.x compatibility, views, routines etc are invalid, and for simplicity should be removed from views (Schema Tab) and even vertical menu.


Table Editor.

  • Has no access to help. In this case, on first view I thought, what does Flags mean as a column attribute? While they not be any help yet, the infrastructure should be in place.
  • Data Type has no completion text. (a.k.a DBDesigner would autocomplete, say if you started with a D, to get Date)
  • Data Type, if you specify nothing, it defaults to (0) which is invalid. If you specify D it defaults to D(0). Regardless of what is entered, the table structure should be syntaxially valid at all times on exit of the field.
  • Options Tab. There are a lot of MyISAM specific options, yet I’m using the default Engine which was InnoDB. These should probably be hidden from view.
  • I don’t like the fact you have to go Apply, then Close, and it’s so easy just to go Close and lose your changes without warning. I think theres is a clear need just for a ‘Save’ which saves your changes and returns you to the Main View
  • Show Advanced/Hide Advanced, is only relevent for the Columns tab (at this time), so it should not be visible on the other tabs.
  • I see no ability in this version (1.0.1+) to define the set of valid Data Types (in my case I like to remove some, to simply autocompletion (which isn’t present)


User Interface

  • No Tool tips for menu icons
  • Help | About didn’t do anything. Would have expected a popup window.
  • I’d like to see some tool tips on the icons used within the objects placed on the Main View.
  • There is no other placeholders for help. Worse case, defining the screens as to be completed, perhaps with some identifier, and then the ability for users to contribute to the help (a web 2.0 think), it will be better then writing from scratch. Even a wiki to allow users to start on the help would I think be benefical

The saved files are XML, yet you give an extension of .mwb While that is nobel, and identifying it’s it’s .xml using a .xml shows it’s XML and also it makes it easier for other use. I can think of 2 straight away. First, I may wish to use XPath Explorer to quickly search for something. Second, I may use XSLT to provide a HTML quick view of my schema?

Go the following error, but was not able to reproduce, created table, added some columns, moved around tabs, added a new column lastUpdateTimestamp, [tab] to goto the data type, and crash.

** CRITICAL **: myx_grt_bridge_dict_item_get_value: assertion `dict != NULL’ failed

Testing/Trialing new MySQL Releases

By now, I’m sure you have all heard about Free VMware Player allowing easy and quick access to see, view and use other OS’s easily. For those Windows users out there, now is your chance to trial MySQL under Linux with no impact to your system, why wait.

See the MySQL Virtual Machine details on the VMware site. On closer inspection this effectively pushes you to the VMware Technology Network (VMTN) page within the MySQL website.

The MySQL guys needs to update their site to reflect new reference to the free player, rather then a trial version of Workstation. Even VMware Server is free (could be mentioned). You can read more about the offerings etc at a previous blog Using VMware Server (free).

Also MySQL is only offering MySQL 4.1.12 (that was released in May last year). Surely this would be a great way to push the newer releases, I’d like to see MySQL offer this for at least the current production GA version 5.0, and it would be a great way to promote new releases, like an alpha release of 5.1. How easy would it be then for people to trial and test the new features without any hint of messing up or changing any existing environments. Perhaps the MySQL marketing department could consider this?

Is is more work? Yes. Will it take resources? Yes. But look at the benefits. Instead of the diehards that are prepared to download bleeding edge releases, you can now reach a newer market of users with an easier, cleaner and throw away installation of newer releases. You would not consider doing it for every dot release, more the current GA 5.0, and alpha and RC’s for newer versions I think.

Using VMware Server (free)

VMware recently released the Free VMware player which allows you to test other OS’s easily in parallel with your current OS. They also provide the Virtual Machine Center so you can even trial easily a number of different pre-packaged solutions.

Of course, my only real need for this is to run Windows apps for limited reasons, and they don’t provide a Windows Virtual Machine, so in order to create one you need another product. VMware provide VMware Workstation which as a 90 day trial, I’ve downloaded a few times, but never actually tried.

Just released is VMware Server which is a free server virtualization for Windows and Linux. Now I haven’t read the differences between these products, but free verses free trial for what appears to be the same thing for what I want, well no brainer.

So in summary, I’ve downloaded the VMware server free edition, installed a Windows XP, and also installed the Browser Appliance from the Virtual Machine Center, and they both work. I’m happy for now.

Release Notes

rpm -ivh VMware-server-e.x.p-20925.i386.rpm


Making sure services for VMware Server are stopped.

Stopping VMware services:
   Virtual machine monitor                                 [  OK  ]

You must read and accept the End User License Agreement to continue.
VMware is a trademark of VMware, Inc.

Do you accept? (yes/no) yes

Thank you.

Configuring fallback GTK+ 2.4 libraries.

In which directory do you want to install the mime type icons?

What directory contains your desktop menu entry files? These files have a
.desktop file extension. [/usr/share/applications]

In which directory do you want to install the application's icon?

Trying to find a suitable vmmon module for your running kernel.

The module bld-2.6.9-5.EL-i686smp-RHEL4 loads perfectly in the running kernel.

Do you want networking for your virtual machines? (yes/no/help) [yes]

Configuring a bridged network for vmnet0.

Your computer has multiple ethernet network interfaces available: eth0, eth0:0,
wlan0. Which one do you want to bridge to vmnet0? [eth0]

The following bridged networks have been defined:

. vmnet0 is bridged to eth0

Do you wish to configure another bridged network? (yes/no) [no] no

Do you want to be able to use NAT networking in your virtual machines? (yes/no)

Configuring a NAT network for vmnet8.

Do you want this program to probe for an unused private subnet? (yes/no/help)

Probing for an unused private subnet (this can take some time)...
The subnet appears to be unused.

The following NAT networks have been defined:

. vmnet8 is a NAT network on private subnet

Do you wish to configure another NAT network? (yes/no) [no]

Do you want to be able to use host-only networking in your virtual machines?

Configuring a host-only network for vmnet1.

Do you want this program to probe for an unused private subnet? (yes/no/help)

Probing for an unused private subnet (this can take some time)...
The subnet appears to be unused.

The following host-only networks have been defined:

. vmnet1 is a host-only network on private subnet

Do you wish to configure another host-only network? (yes/no) [no]

Trying to find a suitable vmnet module for your running kernel.

The module bld-2.6.9-5.EL-i686smp-RHEL4 loads perfectly in the running kernel.

Please specify a port for remote console connections to use [902]

Stopping xinetd:                                           [  OK  ]
Starting xinetd:                                           [  OK  ]
Configuring the VMware VmPerl Scripting API.

Building the VMware VmPerl Scripting API.

Using compiler "/usr/bin/gcc". Use environment variable CC to override.

Installing the VMware VmPerl Scripting API.

The installation of the VMware VmPerl Scripting API succeeded.

Generating SSL Server Certificate

In which directory do you want to keep your virtual machine files?
[/var/lib/vmware/Virtual Machines]
Please enter your 20-character serial number.

Type XXXXX-XXXXX-XXXXX-XXXXX or 'Enter' to cancel:

You cannot power on any virtual machines until you enter a valid serial number.
To enter the serial number, run this configuration program again, or choose
'Help > Enter Serial Number' in the virtual machine console.

Starting VMware services:
   Virtual machine monitor                                 [  OK  ]
   Virtual ethernet                                        [  OK  ]
   Bridged networking on /dev/vmnet0                       [  OK  ]
   Host-only networking on /dev/vmnet1 (background)        [  OK  ]
   Host-only networking on /dev/vmnet8 (background)        [  OK  ]
   NAT service on /dev/vmnet8                              [  OK  ]

The configuration of VMware Server e.x.p build-20925 for Linux for this running
kernel completed successfully.
$ vmware

When started you can enter the supplied license key that was emailed to you.

Running Internet Exploder (ie) under Linux

It’s really so simple, I’m surprised it doesn’t come bundled in distros. (Well I take that back, I’m as anti-microsoft as you can get, but unfortunately, we have to lower ourselves and our good work to the power of Bill who has it over those uninformed majority being brainwashed with a non-standard and flawed browser, that you have to break your code to get to work for it somethings).

Anyway, enough ranting, it’s all at www.tatanka.com.br/ies4linux/. If you can’t have this all done in 15 mins, well you need a faster internet connection! (it takes 14 mins for the downloads, and 1 min of work)


You need Wine and cabextract as pre-requisites.

$ cd /src/rpm
$ wget http://optusnet.dl.sourceforge.net/sourceforge/wine/wine-0.9.2-1fc1winehq.i386.rpm
$ wget http://optusnet.dl.sourceforge.net/sourceforge/wine/wine-0.9.2-1fc1winehq.src.rpm
$ wget http://www.kyz.uklinux.net/downloads/cabextract-1.1-1.i386.rpm
$ wget http://www.kyz.uklinux.net/downloads/cabextract-1.1-1.src.rpm
$ rpm -ivh wine-0.9.2-1fc1winehq.i386.rpm cabextract-1.1-1.i386.rpm


$ cd /opt
$ wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-1.3.4.tar.gz
$ tar xvfz ies4linux-1.3.4.tar.gz
$ cd ies4linux-1.3.4
# It pays to just check some config options as documented first
# see http://www.tatanka.com.br/ies4linux/en/instructions/configuration/
$ ./ies4linux
=================  IEs 4 Linux =================
Install IE6, IE5.5 and IE5 on Linux via Wine.
Credits: Sergio Lopes slopes at gmail dot com
Project page: http://tatanka.com.br/ies4linux
See README file for more info

Installation options:
[1] Install IE6, IE5.5 and IE5
[2] Install only IE6
[3] Install only IE5.5
[4] Install only IE5.0
Please choose an option: 1

...  [churning downloads from that site including  DCOM98.EXE,  mfc40.cab,249973USA8.exe, ie60.exe, ie55sp2.exe, ie501sp2.exe
, swflash.cab ] ...
[ OK ]

Creating basic Windows installation ...
 Creating Wine Prefix
 Installing RICHED20
 Installing DCOM98
 Installing ActiveX MFC40
[ OK ]

Installing IE 6 ...
 Extracting downloaded exe file
 Extracting CAB files
 Installing TTF Fonts
 Configuring ie6
[ OK ]

Installing IE 5.5 ...
 Extracting downloaded exe file
 Extracting CAB files
 Installing TTF Fonts
 Configuring ie55
[ OK ]

Installing IE 5 ...
 Extracting downloaded exe file
 Extracting CAB files
 Installing TTF Fonts
 Configuring ie5
[ OK ]

Installing Flash Player 8 ...
 Preparing installation
 Installing flash on ie6
 Installing flash on ie55
 Installing flash on ie5
[ OK ]

IEs4Linux installations finished! ...


If you want it, you run ie5, ie55, ie60. If I could see just one improvement, a command that you pass a url, and it just opens 3 windows so you can see them all side by side on one screen (bigger screen needed). Of course if you could script input on one, and have it reflected on all that would be even cooler. I’d suspect you could probably achieve this, have a Firefox driver that records stuff, like TestGen4Web, and then replays across the other 3 exploder windows. Food for thought.

Thanks goes to Tate for telling me about this. Yet again, it’s the referral of a physical person that put you on the path.

A working MySQL Workbench Under Linux

I must admit I’d given up trying to get MySQL Workbench working under Linux. I guess I’d spent at least 4 or 5 days full time at it, and it was just out of my league, with GTK and C++ errors. It had seemed like a loosing battle, I’ve had 3 detailed documented goes at 1.0.0. Last Post 19th Jan, and 2 with 1.0.1 Last Post 31st Jan.

Anyway, the good news is I now have MySQL Worbench working under Linux. I’ve been working with MySQL AB on a number of specific problems and you should expect a release from MySQL AB soon to address these. Here is a summary of my experience.

  • 1.0.1 removes the requirements for java dependancies
  • 1.0.1 provides a README.linux with configuration requirements, and a subset list of minimum library requirements (which needs updating)
  • libsigc++2.0.11 (an older version) is necessary, most recent versions up to .17 do not work
  • Solving the library dependancies from true source .tar.gz was difficult to manage, however I finally got to use rpm libraries to provide some consistent reproducible steps. I’ll document later as there we a number of issues with achieving this under CentOS 4.2
  • Solving the GLIBCXX_3.4.4, GLIBCXX_3.4.5, GLIBCXX_3.4.6 error. This is what finally stopped me. Thanks to my new Guru Friend Alfredo who put me on the path to solving this.
  • Underlying glXGetProcAddress() compile error required code changes (which are being incorporated in next release). This finally lead to a binary being built.
  • Executing Binary lasted a split second Segmentation fault $PRG-bin $* Debugging determined the problem to be a specific NVIDIA issue, reverting back to generic Video Drivers only left me with a OpenGL and minimum 32MB 3D accelerated graphics card error.
  • Patched code to this problem (to be incorporated in next release) has lead to a working product, at least enough to play around. Now the real fun begins.

Got heaps more to write about, however that would have slowed down the good news. More to come soon.

My thanks to the team at MySQL AB. I have received excellent care and response from the top down. I’d like to say that all the pain has been worth it in the end, and had this not been a open source company, I would have given up a long time ago.

PAE Support (Part 2)

I’ve solved the PAE Support problem with my current kernel of 2.6.9-22.0.1.ELsmp. Referring to my earlier post PAE Support with the inability to get Parallels VM Software working under CentOS 4.2.

The help was thanks to a prompt response of a support request from the company (so that’s a good sign). Ultimately the trick was to boot the 2.6.9-22.0.1.EL (i.e. not SMP) kernel. Of course the kernel I’m running is the default on my laptop. So really having no idea of the actual impact (obviously something to do with the HT technology I assume).

So, problem solved, will it have an impact on system performance with this kernel? Not sure. I’ve also been told that Parallels 2.1 will have PAE support, just waiting for the response to know if buying 2.0 gives me a free upgrade to 2.1.

Solving the GLIBCXX_3.4.4, GLIBCXX_3.4.5, GLIBCXX_3.4.6 error

Let’s review the problem. I’ve got this on a number of occasions and different libraries. Here are some typical error conditions.

./mysql-workbench-bin: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.5' not found (required by ./mysql-workbench-bin)
Error: Missing Dependency: libstdc++.so.6(GLIBCXX_3.4.6) is needed by package glibmm24

Special thanks to my new Guru friend Alfredo who put me on the path.

$ su -
$ cd /src/rpm
$ wget ftp://rpmfind.net/linux/fedora/extras/4/SRPMS/libsigc++20-2.0.11-1.src.rpm
$ rpmbuild --rebuild libsigc++20-2.0.11-1.src.rpm
$ cd /usr/src/redhat/RPMS/i386/
$ rpm -Uvh libsigc++20*.rpm
Preparing...                ########################################### [100%]
   1:libsigc++20            ########################################### [ 50%]
   2:libsigc++20-devel      ########################################### [100%]

Woot! It was that simple, download the rpm source, compile and install.

What does this ultimately mean? Well, something in your OS configuration isn’t the same as the platform used to build the rpm’s. In my case, I’m running CentOS 4.2, which was been upgraded from CentOS 4.0 via the Network Notification Tool. I’m also trying to install a Fedora FC4 rpm, on a RHEL platform. Anyway, it’s a simple solution and it works and that’s all we need for those that get stuck with this problem.

A detailed History of the problem

$ su -
$ yum install libsigc++20
Setting up Install Process
Setting up repositories
addons                    100% |=========================|  951 B    00:00
update                    100% |=========================|  951 B    00:00
nr-production             100% |=========================| 1.0 kB    00:00
base                      100% |=========================| 1.1 kB    00:00
nr-testing                100% |=========================| 1.0 kB    00:00
nr-mono                   100% |=========================| 1.0 kB    00:00
freshrpms                 100% |=========================|  951 B    00:00
extras                    100% |=========================| 1.1 kB    00:00
Reading repository metadata in from local files
primary.xml.gz            100% |=========================|  35 kB    00:01
nr-mono   : ################################################## 143/143
Added 131 new packages, deleted 87 old in 1.31 seconds
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package libsigc++20.i386 0:2.0.17-1.1.fc4.nr set to be updated
--> Running transaction check
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.4) for package: libsigc++20
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.6) for package: libsigc++20
--> Finished Dependency Resolution
Error: Missing Dependency: libstdc++.so.6(GLIBCXX_3.4.4) is needed by package libsigc++20
Error: Missing Dependency: libstdc++.so.6(GLIBCXX_3.4.6) is needed by package libsigc++20

So doing some investigation.

$ yum info libstdc++
Setting up repositories
addons                    100% |=========================|  951 B    00:00
update                    100% |=========================|  951 B    00:00
nr-production             100% |=========================| 1.0 kB    00:00
base                      100% |=========================| 1.1 kB    00:00
nr-testing                100% |=========================| 1.0 kB    00:00
nr-mono                   100% |=========================| 1.0 kB    00:00
freshrpms                 100% |=========================|  951 B    00:00
extras                    100% |=========================| 1.1 kB    00:00
Reading repository metadata in from local files
Installed Packages
Name   : libstdc++
Arch   : i386
Version: 3.4.4
Release: 2
Size   : 774 k
Repo   : installed
Summary: GNU Standard C++ Library

 The libstdc++ package contains a rewritten standard compliant GCC Standard
C++ Library.

$ rpm -ql libstdc++

$ rpm -qaR libstdc++
rpmlib(CompressedFileNames) < = 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(VersionedDependencies) <= 3.0.3-1

Burning DVD's under CentOS 4.2

Attempt to update XCDRoast. Instructions at http://www.xcdroast.org/manual/dvd.html

su -
wget ftp://ftp.berlios.de/pub/cdrecord/ProDVD/cdrecord-prodvd-2.01a12-i586-pc-linux-gnu
mv cdrecord-prodvd-2.01a12-i586-pc-linux-gnu cdrecord.prodvd
chmod 755 cdrecord.prodvd
# xcdroast not configured for root usage
xcdroast &
# You will get a warning message, this confirms that prodvd is installed

SetUp | Options | CDR_SECURITY_KEY
Now get 4.7GB option, but when attempting to write kept getting can’t init drive option, then it would eject DVD?

So I’ve moved to trying GnomeBaker

su -
cd /src/rpm
wget http://repo.nrpms.net/gnomebaker/0.5.0/RPMS/gnomebaker-0.5.0-1.1.fc4.nr.i386.rpm
rpm -ivh gnomebaker-0.5.0-1.1.fc4.nr.i386.rpm

There were some dependancies, but I’ve not noted these here.