Ok so i quit smoking 4 days ago now. And i am having some serious sleep issues at the moment. i have been up half the night sitting here staring at my screen. But nothing really productive comes out of my hands. So while doing a bit of browsing i hit the MariaDB page. And has been while since i was here. The last time there was no real downloadable package yet. But this has all changed.
So that made me think about last week. I think it was on Friday. but there was some up stirring about MySQL (Oracle) asking a license fee for using the InnoDB storage engine. And quite a big fee if you ask me :) This really sucks. I love the InnoDB engine. What would we do without it…? That’s where MariaDB comes into play. It uses the XtraDB storage engine which is basically InnoDB on steroids. XtraDB is developed and maintained by Percona. Some really smart MySQL guys :) At the moment it’s under the GPL license. And i can only hope it will be freely available for a long time.
So i went ahead and took a look at how hard / easy it is to change MySQL for MariaDB. I tried this on a Debian Lenny machine which made the process quite easy i have to mention.
First get the PGP key from the server and import the repository locations. After that hit update to refresh the local database.
$ wget -O- http://ourdelta.org/deb/ourdelta.gpg sudo apt-key add -
- $ cd /etc/apt/sources.list.d; wget http://mirror.ourdelta.org/deb/sources/lenny-mariadb-ourdelta.list
- $ aptitude update
As we can see we have some new packages
Searching for ‘mariadb’ gives the following packages
$ aptitude search mariadb
So let’s go ahead and install the server and see what happens.
$ aptitude install mariadb-server
Some mysql files get removed the mysql-common package gets updated and the new MariaDB packages get installed.
- The following NEW packages will be installed:
- The following packages will be REMOVED:
- The following packages will be upgraded:
Now that’s done. Let’s check MySQL’s output
$ mysql –version * mysql Ver 14.16 Distrib 5.1.49-MariaDB, for debian-linux-gnu (i486) using readline 5.1
Just as i expected. Nothing really changed here. The whole MySQL API is till available for calling. Only the base system is now replaced by MariaDB. So let’s see what storage engines are available.
$ mysql -uroot -p
- MariaDB [(none)]> show engines;
- BLACKHOLE _/dev/null storage engine (anything you write to it disappears) _
- MRG_MYISAM _Collection of identical MyISAM tables _
- FEDERATED _FederatedX pluggable storage engine _
- MARIA _Crash-safe tables with MyISAM heritage _
- **CSV ** _ CSV storage engine _
- **MEMORY ** _Hash based, stored in memory, useful for temporary tables _
- **ARCHIVE ** _Archive storage engine _
- MyISAM _Default engine as of MySQL 3.23 with great performance _
- InnoDB _Supports transactions, row-level locking, and foreign keys _
- PBXT High performance, multi-versioning transactional engine
And because the MySQL APi is still in tact. From PHP we can keep using the mysql and mysqli interfaces. This is great stuff!