MySQL Errcode: 2 Problem

I’ve continued to get errors like so

WordPress database error: [Can’t create/write to file ‘/tmp/mysqld/#sql_10b5_0.MYI’ (Errcode: 2)]

on our intranet that runs Wordpress.  I’m not quite sure how to fix this longterm yet, but here’s a diagnosis and a patch for the problem:

It seems as though every time the computer restarts the /tmp/mysqld directory is removed (either on shutdown or on reboot) and isn’t put back in place.  So here’s what you need to do to put it back

sudo mkdir /tmp/mysqld && sudo chown -R mysql.mysql /tmp/mysqld

I’m having this problem on an Ubuntu 6.06 machine so if anyone has useful suggestions about why this is being removed and how I can prevent it, please let me know.  Thanks!

Ubuntu Host - Windows XP Guest - USB Device Not Recognized

Setup : Ubuntu 6.10 host, Windows XP guest, VMWare Server 1.0.2 build-39867

Hrm… so every once in a while I’ll connect a USB device to a Windows XP guest only to get a message :

USB Device not Recognized. One of the USB devices attached to this computer has malfunctioned, and Windows does not recognize it.

What the hell?  Usually what happens is 1) I plug in the device and it works fine, 2) Guest restarts, 3) device fails on reboot, 4) removing device from VM then readding doesn’t help.

Solution?

  1. Remove the device from the machine, while it’s started
  2. Shutdown the guest machine
  3. Remove your USB Controller
  4. Restart the machine
  5. Let it cycle through startup process
  6. Shut it down
  7. Add the USB Controller back to the VM
  8. Restart the machine
  9. Enable the device for the VM
  10. Voila!

If there’s a better solution, or if someone knows why this happens please let me know!

Creating Firefox Search Engine Plugins - Ubuntu 6.10

I was trying to quickly create a search engine plugin for my new Ubuntu 6.10 installation so that I could search the Purdue Directory. This didn’t turn out to be as easily done as I had previously encountered with Windows. However, it was simply my misunderstanding of the filesystem that ultimately caused the trouble. Here’s the quick and dirty way to add a simple search engine to your Ubuntu 6.10/Firefox installation :

cd to the Plugin directory

cd /usr/share/firefox/searchplugins/

Purdue Directory Plugin Source (save this file as “purduedir.src”)

# Mozilla/Purdue Directory plug-in by cjsmith@purdue.edu

<search
name=”Purdue Directory”
description=”Purdue University Directory Search”
method=”POST”
action=”http://www.itap.purdue.edu/directory/new/index.cfm”
queryEncoding=”utf-8″
queryCharset=”utf-8″
>

<input name=”searchType” value=”all”>
<input name=”search” user>

</search>

Add a Purdue image to the mix so that it’s easily identifiable in the list

sudo wget http://mycroft.mozdev.org/install.php/1298/purdue.png

Change the filename of the image to match the .src file that we created earlier

sudo mv purdue.png purduedir.png

That’s it! Restart Firefox and you should see your new Purdue Directory search plugin added to the list.