drizzle
Profile
Search
 
Hosted by The Rackspace Cloud
User Documentation

Drizzle User Guide

Last Edited by: --Msacks 09:07, 23 December 2008 (UTC)

Contents

About Drizzle

About Drizzle

The purpose of this document is to give a complete reference manual for getting started with using Drizzle and developing and contributing to the Drizzle.org Project.

Intended Readers

The primary intended readers of this document are application developers and general users and administrators who are interested in using the Drizzle, highly concurrent platform.

What does this document assume about the reader?

This document assumes that the reader understands the basic functionality of a DBMS system and SQL syntax. Those familiar with MySQL will find Drizzle to be somewhat similar in functionality and use.

What you’ll be able to do after reading this document

The user should be able to get Drizzle running and set up their development environment for contributing to the Drizzle project.

Drizzle Overview

Drizzle History

What can Drizzle do?

Differences in use with MySQL

For DDL, OPTIMIZE and REPAIR are no longer supported.

REPAIR: All engines will "repair" themselves without operator intervention.

OPTIMIZE: Can be done via a ALTER TABLE ENGINE=<SAME ENGINE>. "mysqladmin" is no longer required to shutdown drizzle. Instead you can just do a "drizzle --shutdown" from the command line.

Drizzle compared with SQLite

Is Drizzle right for me?

Getting Started with Drizzle

Using Launchpad.net

Getting started with Bazaar

Installing Drizzle

Ubuntu 9.04, 9.10

1. Make sure your package libs are up to date.

sudo apt-get update

sudo apt-get upgrade

2. Install utilities to get latest dependencies from Launchpad

For 9.10

sudo apt-get install python-software-properties

Add Drizzle dependencies repository

sudo add-apt-repositories ppa:drizzle-developers/ppa

For 9.04

Add the following to your /etc/apt/sources.list

deb http://ppa.launchpad.net/drizzle-developers/ppa/ubuntu jaunty main 
deb-src http://ppa.launchpad.net/drizzle-developers/ppa/ubuntu jaunty main

Now add the PPA key:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 06899068

sudo apt-get update

3. Install all the package dependencies

sudo apt-get install libpcre3-dev autoconf automake bison libtool ncurses-dev libreadline-dev libz-dev g++ libssl-dev uuid-dev libpam0g libpam0g-dev gperf libevent-dev bzr libprotobuf-dev protobuf-compiler libdrizzle-dev libboost-dev make

4. Now you can build, configure, and install Drizzle.

bzr export drizzle lp:drizzle

cd drizzle

./config/autorun.sh

./configure

make

sudo make install

Old: Downloading Source Code and Compiling Drizzle

Drizzle Binaries Layout

Installation Troubleshooting

Starting the Drizzle Server and Client

Ubuntu 9.04 and 9.10

Starting the Drizzle Server

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

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/USER/drizzle/data

Finally start up the Drizzle Server with:

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

Stopping the Drizzle Server

drizzle [OPTIONS] --shutdown

Starting the Drizzle Client

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>

Starting Drizzle Troubleshooting

Fatal error: Please read "Security" section of the manual to find out how to run drizzled as root!

If you are trying to start drizzle as root, you must specific the user to run as.

drizzled -u [USER]


Data directory /home/drizzle/drizzle/data/ does not exist

The data directory specified does not exist.


Can't start server: can't create PID file (/root/data/drizzle-ubuntu-910.pid): Permission denied

You do not have write permissions to the data directory specified.

Drizzle Configuration

Command line options

Accessing Drizzle

Command Line Drizzle Access

Tab completion

Programatically Accessing Drizzle

DBD::Drizzle

Other Drizzle Connectors

GUI Drizzle Access

Upgrading Drizzle

To upgrade Drizzle:

Be safe! Backup your database.

At this point you will need to do a full backup, uninstall Drizzle, reinstall, and restore your data.

Connecting to Drizzle

Authentication

Authentication is done via the authentication plugin. Without the plugin, anyone can connect and do anything in Drizzle if they can connect to the port that Drizzle listens on.

Drizzle's SQL

Language Structure

Comments

Case-sensitivity

Comparisons of tables and schema are done via upper case comparisons. For any paths made to disk, the paths are lower cased.

Escape characters

Reserved words

Quoting

Character sets and collations

"SQL mode"

Data Types

Character Strings

BLOB Strings

Numbers

Boolean

Datetime

Microseconds

Conversions

Time Zones

Intervals

Other data types

ENUM

Using NULL

Index Types

Key constraints

Indexes for faster lookups

SQL Syntax Reference

CREATE

IF NOT EXISTS

Check constraints

Foreign Keys

Views

DROP

IF EXISTS

DELETE

INSERT

REPLACE

SELECT

GROUP BY

ORDER BY

FOR UPDATE

INTO OUTFILE

LIMIT

UNION

SET

SHOW

UPDATE

Table maintenance

ie ANALYZE, CHECK, OPTIMIZE, REPAIR

Functions

SQL standard functions

Drizzle extensions

Drizzle Administration

Shutting Drizzle Down

Drizzle can be shutdown from the command line by using the Drizzle CLC. Just issue a "drizzle --shutdown"

Storage Engines

Plugins

Finding a Plugin

Installing plugins

Locking

Transactions

memcached

Backups and Recovery

Logging

Replication

Measuring Performance

Security

INFORMATION_SCHEMA

Drizzle Architectures

Getting Started in Developing for Drizzle

You have the source, now what?

Setting up Your IDE

Further Reading

Launchpad site for Drizzle

FAQs for Review

Q: Why are there only certain sections of the documentation filled out?
A: The Drizzle documentation is currently under construction. Drizzle users are encouraged to contribute to the documentation.

12. Getting Help


= Drizzle Contributors =