Jun 302012
 

Drizzle is an open source fork of MySQL, actually InnoDB only, that is designed to be faster and more scalable than the vanilla MySQL.

I finally decided to test it out instead of just mucking around as I had done earlier. * My system *


uname -a
Linux Tron 3.0.0-13-generic #22-Ubuntu SMP Wed Nov 2 13:25:36 UTC 2011 i686 i686 i386 GNU/Linux</pre>

Installing

Headed over to Drizzle and proceeded to see how I can install their box version. I chose Ubuntu as I have a bare metal 11.10 which will do quite well to test both MySQL and Drizzle out. Followed instructions athttp://docs.drizzle.org/installing/ubuntu.html The CentOS install looks a lot lengthier (workarounds?). The best way would be to compile from source but I am not really interested in that right now.

At the update I get the following errors. This is understandable.


Ign http://extras.ubuntu.com oneiric/main TranslationIndex
Ign http://extras.ubuntu.com oneiric/main Translation-en_SG
Ign http://extras.ubuntu.com oneiric/main Translation-en
Fetched 762 kB in 2min 15s (5,607 B/s)
W: Failed to fetch http://ppa.launchpad.net/drizzle-developers/ppa/ubuntu/dists/oneiric/main/source/Sources  404  Not Found
W: Failed to fetch http://ppa.launchpad.net/drizzle-developers/ppa/ubuntu/dists/oneiric/main/binary-i386/Packages  404  Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.</pre>

However, I was able to complete installation without issues. Time to RTFM. Yes! I like to dive first read later, makes it more interesting.

Configuring

If you visit the docs http://docs.drizzle.org/configuration/options.html#config-files you will see it does not really say where the config file is. This tells me that Drizzle assumes prior knowledge of MySQL Administration so you can fill in the gaps yourself, but Drizzle is very different. Or you could help with Documentation yeah? Drizzle claims to work without configuration out-of-the-box. However since I do have a mysql protocol port used I want to make sure I override it in Drizzle.

I create my config directories under a regular user, in mysql it just went to /etc/ mount point by default. Drizzle made no assumption, there was no directory or anything. Maybe it’s just on Ubuntu, honestly I don’t know. Doc says default direcroty is /etc/drizzle. it even goes on to say that it has a specific name for the default file if you want to skip specifying one.


cd ~
mkdir drizzled
touch drizzled/drizzled.cnf #
touch drizzled/conf.d/server1.cnf # drizzle will read all configs in this directory automatically
touch drizzled/conf.d/auth
touch drizzled/users</pre>

This is good enough for me. So I can now specify a default conf and a directory with all my config in case I need more than one.

Edit drizzled.cnf.


vi drizzled/drizzled.cnf

adding the config values I need.


drizzle-protocol.port=4427
mysql-protocol.port=3307 # since I use 3306 for mysql
innodb.buffer-pool-size=500M

Edit the auth file , which you should set to strict permission I suppose. In drizzled/conf.d/auth where I will write what the doc says.

plugin-remove=auth_all
plugin-add=auth_file
# Options for the plugin itself
[auth-file]
users=/home/drizzle/drizzled/users #assuming your home is drizzle a full path is needed.

I could apparently write everything in one file (drizzled.cnf) except the users.

The documentation breaks off at this point and goes into details of Options and Values so I go looking for RTFM on Auth.

Setup of authentication

This I like, you can easily setup Auth just like PostGreSQL anyway you want. You can read more here http://docs.drizzle.org/administration/authentication.html To keep things simple I used flat file. The suggested way is Schema which is same as MySQL, meaning usernames and passwords are stored in a table inside the database of the Drizzle DB, like the mysql.user table. To set that up will take more time but the gyst is, we first allow all, then create an admin users…snore. Feel free to read about it and knowck yourself out. Moving on to Flat file …

Since I already added my flat file settings above I am going to now fill it in with my users. This is easy (or so I thought), e.g.


user1:password1
user2:password2

… cute.

I suppose we’re done here, it was painful but now I have a neat gun. Now the good stuff.

Start your engine

Issuing command…

drizzled &#8211;config-dir=/home/drizzle/drizzled/
 output: Local catalog /var/lib/drizzle/local does not exist

 wtf! ouch!

Troubleshooting…as its obviously a permission issue.

Seems I am logged in as user abhishek but drizze is user drizzle facepalm A handy command line option appears: [-u] Unfortunately I need to sudo and then provide the user. Directly won;t work 

#sudo drizzled &#8211;user drizzle &#8211;config-dir=/home/drizzle/drizzled/
 To daemonize it, we need spawns @.@

sudo drizzled &#8211;user drizzle &#8211;daemon &#8211;config-dir=/home/drizzle/drizzled/

_ I believe my setup is wrong on this part, it could have been done better. It works fine for now so I can test _ We’re online, lets login.

drizzle

wtf!, I can login. So it seems my default file is not being read, contrary to RTFM. fair enough. I forced the –defaults-file= option but I got a new error. It turns out I need the plugin for auth-file which I am trying to use. I don’t know where I can download this, docs are being generally unhelpful here. Time to go fish… a.k.a google.

I never did get the auth working. I stopped using drizzle, though i believe you can use it as embedded DB or something.

 Posted by at 7:08 am

Leave a Reply