MySQL to Drizzle, stress free migration Andrew Hutchings Software Developer Rackspace [email_address] Http://www.linuxjedi.co.uk/
What is Drizzle?
KDE3 -> 4 New Frameworks
Easier for Developers
Improved Usability
MySQL to Drizzle, stress free migration Picture by K Latham under a CC by NC SA 2.0 license
Installing
Installing in Ubuntu Natty: sudo apt-get install drizzle Lucid & Maverick: sudo apt-get install python-software-properties sudo apt-add-repository ppa:drizzle-developers/ppa sudo apt-get update sudo apt-get install drizzle (These instructions are also on  http://docs.drizzle.org/ )
Installing on Fedora Create a /etc/yum.repos.d/drizzle.repo: [drizzle] name=drizzle baseurl=http://rpm.drizzle.org/7-dev/fedora/$releasever/$basearch/ enabled=1 gpgcheck=0 [drizzle-src] name=drizzle-src baseurl=http://rpm.drizzle.org/7-dev/fedora/$releasever/SRPMS enabled=1 Gpgcheck=0 Then: su -c “yum install drizzle7-server drizzle7-client” (These instructions are also on  http://docs.drizzle.org/ )
Not Supported
Not Supported (yet) Stored Procedures
Triggers
Views
SET data type
Partitions
Not Supported (at all) MyISAM (as a main table)
Memory/Heap (as a main table)
FULLTEXT indexes
DELETE/UPDATE using multiple tables
Multiple timezones (only UTC)
Cartesian Joins
Protocol Picture by Derek Kaczmarczyk under a CC by 2.0 license
Protocol Existing Application libmysqlclient Drizzle New Application libdrizzle
Settings Picture by Travel Aficionado under a CC by NC 2.0 license
Settings Configuration can be multiple files
Just use --config-dir=/path/to/files
By default no configuration is needed
Settings Example config file 1: user=test max-heap-table-size=32M
Settings Example config file 2: innodb.buffer-pool-size=256M mysql-protocol.max-connection=2000
Settings Example config file 3: [innodb] buffer-pool-size=256M [mysql-protocol] max-connections=32
Authentication Auth_all Auth_file Auth_http Auth_ldap Auth_pam Auth plugin system
Replication Picture by Kristina Alexanderson under a CC by NC SA 2.0 license
MySQL Replication Slave Master Binary Log IO thread SQL thread Transaction InnoDB
Drizzle Replication Slave Master InnoDB Replication Reader Replication Applier Transaction
Drizzle Replication Start Master: $ drizzled --innodb.replication-log Slave config (slave.cfg): master-host=my_host master-port=3306 master-user=my_user master-password=my_password Start Slave: $ drizzled --plugin-add=slave --slave.config-file=/path/to/slave.cfg
Drizzle Replication Disabling replication for a database or table: drizzle> create table t2 (a int) replicate=FALSE; Query OK, 0 rows affected (0.087416 sec) drizzle> create database test2 replicate=FALSE; Query OK, 1 row affected (0.280803 sec)
Schemas – Removed Types TINY/SMALL/MEDIUM INT
TINY/MEDIUM/LONG BLOB/TEXT
YEAR
SET
CHAR/BINARY
Schemas – Changed Types Time In MySQL range is -839:59:59 to 838:59:59 In Drizzle range is 00:00:00 to 23:59:59
Schemas – Changed Types Date/Datetime First valid date in MySQL 0000-00-00 First valid date in Drizzle 0001-01-01
Schemas – Changed Types INT UNSIGNED UNSIGNED is only a constraint in Drizzle For extended values use BIGINT
Schemas – Changed Types INT(n) The braces are not used and ignored.
Schemas – New Types TIMESTAMP(6) TIMESTAMP(6) stores microseconds drizzle> select now(); +----------------------------+ | now()  | +----------------------------+ | 2011-04-14 00:17:14.638962 |  +----------------------------+ 1 row in set (0.000396 sec)
Schemas – New Types UUID Stores universally unique values drizzle> select * from t1; +------+--------------------------------------+ | a  | b  | +------+--------------------------------------+ |  1 | 22681f76-41fa-4245-8461-96dba0961675 |  +------+--------------------------------------+ 1 row in set (0.000409 sec)
Schemas – New Types BOOLEAN Native BOOLEAN, stores in a single bit where engine supports it. drizzle> select * from t1; +------+------+ | a  | b  | +------+------+ |  1 | TRUE |  +------+------+ 1 row in set (0.000408 sec)
Schemas - Strictness Erroneous ENUM actually errors
Divide by zero is an error
Not NULL actually means Not NULL
Character Sets Drizzle supports 2 character sets: UTF-8 and Binary
Information Schema Now follows the SQL standard Everything else is in DATA_DICTIONARY

Drizzle to MySQL, Stress Free Migration