Getting Drizzle Started -or- “Know thy Path!”

After being gone a while for the day job I have finally gotten around to setting up my storage file locations and permissions in Drizzle. Stuart Smith helped me get past some problems, mostly associated with not knowing basic syntax, but I also ran into one or two that are due to changes ongoing in Drizzle. After spending a lot of time not knowing what I didn’t know (one of the quirks of teaching yourself), a little chat finally straightened me out.

So after Drizzle is installed on Ubuntu you obviously have to have a place to store your data. To avoid all the time we spent figuring out what was going on, just pay attention to the last lines after you run your “make install” so you know where the damn thing is.

Run your sudo command then add your user group where drizzle is the name of the group you want to have access to the drizzle server:

$ sudo groupadd drizzle

then create a new user within that group, replacing USER with your user name.

$ sudo useradd -g drizzle USER

After running this procedure a couple times I found that on one install the directory was created for me, on another I had to create it. Either way, make sure you have a new directory for drizzle and then a data directory in that:

$ sudo mkdir /home/USER/drizzle
$ sudo mkdir /home/USER/drizzle/data

Now set up the permission on that directory for your user:

$ sudo chown -R drizzle:USER /home/drizzle/data

Finally start up the Drizzle Server with:

$ sudo -u USER /usr/local/sbin/drizzled --datadir=/home/USER/drizzle/data

You should get a bunch of lines of code saying the Drizzle server and InnoDB are now running and what ports it is listening too. Now you can start up the Drizzle Client:

sudo -u USER /usr/local/bin/drizzle

and you should see:

Welcome to the Drizzle client.. Commands end with ; or \g.
Your Drizzle connection id is 1
Server version: 2009.12.1251 Source distribution (drizzle)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
drizzle>

I found that if I installed this on a server that already had MySQL running on it, the start up command would return an error where the InnoDB (a storage engine drizzle uses) was already using the port that Drizzle wanted to use. I had to shut down MySQL on port 3306 to get it up and running. Mark Atwood helped me get past that issue.

Everything seemed to work much cleaner installing on a clean system but that I guess is to be expected. I don’t know all the ways Drizzle will overlap and conflict with other programs and I expect MySQL is the first and most frequent one I will notice.

RSS feed for comments on this post. TrackBack URI

Leave a Reply