5 things MySql

20
5 things you need to know about MySQL (if you don’t have a DBA) sarah novotny – [email protected] MySQL and LAMP services www.BlueGecko.net

description

5 things you need to know about MySQL if you don't have a DBA. From OSBridge '09.

Transcript of 5 things MySql

Page 1: 5 things MySql

5 things you need to know about MySQL

(if you don’t have a DBA)

sarah novotny – [email protected] and LAMP services

www.BlueGecko.net

Page 2: 5 things MySql

①changing ecosystem②versions③storage engines and locking④backups⑤scaling⑥free tools

www.BlueGecko.net

Page 3: 5 things MySql

①changing ecosystem

MySQL ->Sun ->

Oracle

Monty Program ABOpenDB Alliance

www.BlueGecko.net

Page 4: 5 things MySql

www.BlueGecko.net

Page 5: 5 things MySql

② 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

Page 6: 5 things MySql

www.BlueGecko.net

Page 7: 5 things MySql

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

Page 8: 5 things MySql

③storage engines

innodbmyisammergeblackholearchivefederated

www.BlueGecko.net

Page 9: 5 things MySql

③and locking

innodbmyisam

www.BlueGecko.net

Page 10: 5 things MySql

③and locking

www.BlueGecko.net

Page 11: 5 things MySql

④backups

take them and test a restore

www.BlueGecko.net

Page 12: 5 things MySql

④backups

mysqldump is not always a valid backupreplication is easiest

(and it gets you a warm standby)InnoDB hot backupXtraBackupmylvmbackup

www.BlueGecko.net

Page 13: 5 things MySql

④backups

www.BlueGecko.net

Page 14: 5 things MySql

⑤scale

when it’s time togo big, what arethe options?

separate reads from writes

www.BlueGecko.net

Page 15: 5 things MySql

⑤scale

write 1 / read manypartitioning / shardingmultimaster / ringsmemcached wafflegrid

www.BlueGecko.net

Page 16: 5 things MySql

anothershortdiversion

to swap ornot to swap that is the question

www.BlueGecko.net

Page 17: 5 things MySql

⑥free tools

InnotopmaatkitMySQL proxymonitoring/trending

cacti templates$monitoring_server – the one you know

www.BlueGecko.net

Page 18: 5 things MySql

additional resources

• irc.freenode.org– #mysql– #maatkit

• mysql.com• HPM2e -Baron Schwartz,

Peter Zaitsev, Vadim Tkachenko, and Jeremy Zawodny

www.BlueGecko.net

Page 19: 5 things MySql

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

Page 20: 5 things MySql

Blue Gecko and contact info

[email protected][email protected]• @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.