Media Wiki /var/www/includes/db/Database.php: DatabaseBase::factory no viable database extension found for type ‘mysql’

I just upgraded Ubuntu and unfortunately the MediaWiki installation broke. There was no debugging output on the screen (for obvious security reasons). So, I just had a blank page on the screen.

The first thing that I did was show the debugging output but editing the LocalSetting.php to enabling

$wgShowExceptionDetails = true;

After refreshing the page, the error appeared as

/var/www/includes/db/Database.php: DatabaseBase::factory no viable database extension found for type 'mysql'

It turns out the problem was php not connecting to MySQL properly.

sudo php5enmod mysql
sudo service apache2 restart

How to remove Ubuntu Landscape Client *

I have started to remove the Ubuntu / Cannonical Landscape Client from all my Ubuntu servers because otherwise it is just another service:

  1. Running in the background using power
  2. Potiential security hole with root permission
  3. I don’t actually use it

It is quite simple:

sudo apt-get remove landscape-client landscape-client-ui landscape-client-ui-install landscape-common

If Cannonical open sourced the service for Landscape then I would actually start using it but in the meantime…

Strange Conveyor User Ubuntu

I have just been looking at the processes on my laptop and noticed a python process running as a user called ‘conveyor’. I can’t remember adding a user or installing a program called conveyer. It turns out that it was a Makerbot process. So, a quick…

apt-get remove makerbot* 

…helped sort that out. Why Makerbot doesn’t make a user called Makerbot, I have no idea.

How to extend / increase a Windows Partition on KVM QEMU VM

We have a Windows 7 VM running on Ubuntu KVM. I needed to give the Windows 7 machine more disk space. This turns out to be really easy (when you know how).

Step 1 – Shutdown the VM

virsh shutdown hostname

Step 2 – Increase the qcow2 image
Find the qcow2 file of the VM and take a backup (just in case).

cp hostname.qcow2 hostname.qcow2.backup
qemu-img resize hostname.qcow2 +100GB

Step 3 – Start the VM
Now start the VM.

virsh start hostname

Step 4 – Extend the partition in Window
Windows has a really good partition management utility built into it. Search for “disk management”

window_7_vm_disk_resizing

Then select the partition, right click and choose extend partition. You should then follow the simple steps and you are done.

Let me know if you have any improvements to this.