Switching MySQL for MariaDB on Ubuntu.

MariaDB offers quite a few improvements over MySQL, mainly in the storage engines it provides. Firstly, the Maria engine is a crash safe version of MyISAM which in the future will also support transactions. Secondly, the XtraDB engine is an enhanced version of Innodb which can give considerable speed improvements over the standard Innodb engine. There are many other features and improvements over the standard MySQL distribution, move info on the differences can be found here: http://askmonty.org/wiki/MariaDB_versus_MySQL

The easiest way to install MariaDB is to add one of the repositories, I’ve used OurDelta:

wget -O- http://ourdelta.org/deb/ourdelta.gpg | sudo apt-key add -
sudo wget http://ourdelta.org/deb/sources/lucid-mariadb-ourdelta.list -O /etc/apt/sources.list.d/ourdelta.list

Then install MariaDB:

sudo apt-get install mariadb-server-5.1

This should install MariaDB without any problems, it should also replace MySQL if you already installed it:

# apt-get install mariadb-server-5.1
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
libmariadbclient16 libmysqlclient16 mariadb-client-5.1
mariadb-client-core-5.1 mariadb-server-core-5.1 mysql-common
Suggested packages:
tinyca mailx mariadb-test
The following packages will be REMOVED
libmysqlclient-dev libmysqlclient16-dev mysql-client mysql-client-5.1
mysql-client-core-5.1 mysql-server-5.1 mysql-server-core-5.1
The following NEW packages will be installed
libmariadbclient16 mariadb-client-5.1 mariadb-client-core-5.1
mariadb-server-5.1 mariadb-server-core-5.1
The following packages will be upgraded:
libmysqlclient16 mysql-common
2 upgraded, 5 newly installed, 7 to remove and 8 not upgraded.

If you are upgrading from MySQL, you will probably be prompted to overwrite the my.cnf and for a new root password. I generally choose Y to overwrite and enter my existing root password to avoid issue.

You can also follow my previous post to upgrade the client library used by PHP, rather than installing the MySQL dev package, the Maria equivalent should be used:

sudo apt-get install libmariadbclient16-dev
  • Share/Bookmark

iPhone 4 vs HTC Evo

Great video!
YouTube Preview Image

  • Share/Bookmark

This is really clever!

Apple iPad ads in San Francisco have been replaced all over the city, very cleverly done! You have to pause and read the content!

http://www.vimeo.com/12402075
  • Share/Bookmark

GoMySQL 0.2

Today the latest version of GoMySQL is available from the Github repository.

This is a beta version and can be obtained by checking out the master branch.

This version includes bug fixes and standardisation of function format, it will also include some new features which will be added over the next few days.

  • Share/Bookmark

Awesome Windows 7 Ad!

YouTube Preview Image
  • Share/Bookmark

Update Zend Server MySQL extensions

As the MySQL extensions with Zend Server are out of date, I decided to update them as it’s pretty simple to do.

Install the source package:

sudo apt-get install php-5.2-source-zend-server

or

sudo apt-get install php-5.3-source-zend-server

Install the MySQL client dev package:

sudo apt-get install libmysqlclient16-dev

Install autoconf:

sudo apt-get install autoconf

From this point onwards I ran as root as saves time having to sudo everything, I have also created symlinks for the binaries in /usr/local/zend/bin to /usr/local (php, phpize, php-config, pear, pecl etc)

Change to the extensions directory of the source you just installed:

cd /usr/local/zend/share/php-source/php-5.3.2/

There are 3 extensions that need to be recompiled mysql, mysqli and pdo_mysql, the following procedure is the same for all 3:

cd mysql
./configure
make
cp modules/mysql.so /usr/local/zend/lib/php_extensions/

Finally restart Zend Server and all the MySQL extensions will be using the latest libraries.

  • Share/Bookmark

Zend Server on Ubuntu Lucid has dependency problems

When trying to install Zend Server on Lucid you will be met with the following dependency problems:

The following packages have unmet dependencies:
php-5.2-mysql-zend-server: Depends: libmysqlclient15off (>= 5.0.27-1) which is a virtual package.
php-5.2-pdo-mysql-zend-server: Depends: libmysqlclient15off (>= 5.0.27-1) which is a virtual package.
php-5.2-mysqli-zend-server: Depends: libmysqlclient15off (>= 5.0.27-1) which is a virtual package.

Along with the rather unsatisfactory resolution:

The following actions will resolve these dependencies:
Keep the following packages at their current version:
help-zend-server-ce [Not Installed]
php-5.2-common-extensions-zend-server-ce [Not Installed]
php-5.2-mysql-zend-server [Not Installed]
php-5.2-mysqli-zend-server [Not Installed]
php-5.2-pdo-mysql-zend-server [Not Installed]
zend-server-ce-php-5.2 [Not Installed]

The reason for this error is that the Zend MySQL packages are built against MySQL 5.0 (despite the fact 5.1 has been GA for over a year now).

Ubuntu have removed MySQL 5.0 in Lucid, but the package from Karmic is usable and available here: http://ns2.canonical.com/pt/karmic/libmysqlclient15off

Simply install this and Zend Server will install nicely.

  • Share/Bookmark

HTML 5 demo on the iPad

Here is an amusing demo of HTML 5 on the iPad, no need for Flash says Jobs!

YouTube Preview Image
  • Share/Bookmark

First Go Library

My first library written in the Go programming language, GoMySQL, is now complete and available to download from my projects pages.

The library fully implements the MySQL protocol and supports the majority of the common features found in other libraries, including:

  • Single queries
  • Multiple queries
  • Change database
  • Prepared statements

There are a number of other libraries available for Go, but none of them (as yet) implement the full protocol.

To download visit the GoMySQL project page.

  • Share/Bookmark

A shaky start for Ubuntu 10.04 Desktop

Whereas I have been running Lucid since beta1 on my laptop without too many issues, my desktop PC doesn’t get upgraded until release day.

After eventually managing to download the ISO, loading 5 different email backups to find my Nero key and waiting half an hour for the Lightscribe to burn onto the CD I finally got to boot the live CD….

Flashing cursor…
Power saver mode…
[2 minutes go by]
Screen powers on…
Strange Windows 7 blockiness (presumably something left in the video memory)…
[Another minute goes by]
Desktop, finally.

Install goes smoothly, nice to see the migration wizard is disabled by default and has clear options, should you choose to use it.

Try to reboot and machine hangs with just the desktop background.

Reset, restart…
The infamous flashing cursor…
Login screen…

I attempt to login and get a popup about power saving not working do I still want to logout? Odd… No I want to login really :)

Click continue, it goes away, finally get to the desktop.

One thing is immediately clear, Plymouth = EPIC FAIL.
So far it doesn’t work on Intel or Nvidia hardware, 2 of the 3 post popular video chip manufacturers!
I guess this is what happens when you name something after a scummy little city hidden away in the south west of England…

Testing continues…

  • Share/Bookmark