Post on 08-May-2015
description
5 things you need to know about MySQL
(if you don’t have a DBA)
sarah novotny – sarah@bluegecko.netMySQL and LAMP services
www.BlueGecko.net
①changing ecosystem②versions③storage engines and locking④backups⑤scaling⑥free tools
www.BlueGecko.net
①changing ecosystem
MySQL ->Sun ->
Oracle
Monty Program ABOpenDB Alliance
www.BlueGecko.net
www.BlueGecko.net
② versions
5.0 – stable. (do i need to say more?)5.1 – fresh feature set
– many open bugs – partitioning – row base replication – mysqlslap
5.4 – 5.1 ++ google patches – scalability improvements -> multicore – enhanced monitoring / diagnostic – sane defaults for my.cnf out of the box
www.BlueGecko.net
www.BlueGecko.net
a short diversion
from High Performance MySQL 2nd Edition (HPM2e)-Baron Schwartz, Peter Zaitsev, Vadim Tkachenko, and Jeremy Zawodny
(don’t mistake 1st Edition for 2nd. 1st is dangerously out of date unless you’re running version 4.0)
www.BlueGecko.net
③storage engines
innodbmyisammergeblackholearchivefederated
www.BlueGecko.net
③and locking
innodbmyisam
www.BlueGecko.net
③and locking
www.BlueGecko.net
④backups
take them and test a restore
www.BlueGecko.net
④backups
mysqldump is not always a valid backupreplication is easiest
(and it gets you a warm standby)InnoDB hot backupXtraBackupmylvmbackup
www.BlueGecko.net
④backups
www.BlueGecko.net
⑤scale
when it’s time togo big, what arethe options?
separate reads from writes
www.BlueGecko.net
⑤scale
write 1 / read manypartitioning / shardingmultimaster / ringsmemcached wafflegrid
www.BlueGecko.net
anothershortdiversion
to swap ornot to swap that is the question
www.BlueGecko.net
⑥free tools
InnotopmaatkitMySQL proxymonitoring/trending
cacti templates$monitoring_server – the one you know
www.BlueGecko.net
additional resources
• irc.freenode.org– #mysql– #maatkit
• mysql.com• HPM2e -Baron Schwartz,
Peter Zaitsev, Vadim Tkachenko, and Jeremy Zawodny
www.BlueGecko.net
credits
flickr• Make: biosphere - kevino• MySQL mints - jimwinstead• 5 – losmininos• storage- shuttercat7• clones - adactio• Bell Labs - sodapop81• License plate - severud• tools – meanestindian• console - hermzz
other• swap image
– http://www.vocw.edu.vn/content/m10106/latest/
• special thanks to mike hamrick for suggestions on content and slides
www.BlueGecko.net
Blue Gecko and contact info
• sarah@bluegecko.net• sarah.novotny@gmail.com• @sarahnovotny• @bluegeckodba• senk on #mysql
www.BlueGecko.net
Blue Gecko provides Remote DBA services for companies around the world
7x24x365 support including monitoring, performance analysis, proactive maintenance and architectural guidance for small and large datasets.