you know databases, how hard can mysql be?
DESCRIPTION
DBAs everywhere are being asked to support MySQL as a less costly alternative in Oracle's portfolio. Rest assured, (almost) everything you know about Oracle can be translated and applied to supporting MySQL with some new vocabulary and some smart starting points. This talk will touch on 5 things that are helpful to get right from the beginning. Through anecdotes i'll spotlight some common pitfalls, share paths to a fix If you've inherited a running system and offer a vocabulary lesson so those who speak Oracle can start understanding MySQL. I'll be touching on user management and security, backups and replicas, monitoring, storage engine choices, and probably monitoring again (because it is that important).TRANSCRIPT
you know databases
(how hard can MySQL be?)
sarah novotny – [email protected] database services
www.BlueGecko.net
①language②user management and security③storage engines and locking④backups and replicas⑤monitoring⑥free tools
www.BlueGecko.net
① common language
www.BlueGecko.net
schema instanceSGA/PGA/UGA
filesystem layout
www.BlueGecko.net
① common language
SGAishmax_memory =
thread_memory * max_connections + query_cache_size + innodb_buffer_pool_size + innodb_additional_mem_pool_size + innodb_log_buffer_size + key_buffer_size
www.BlueGecko.net
① common language
UGAishthread_memory =
thread_stack_size + net_buffer_length + max_allowed_packet + read_buffer_size + join_buffer_size + tmp_table_size + myisam_sort_buffer_size
www.BlueGecko.net
① common language
www.BlueGecko.net
① common language
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
www.BlueGecko.net
② user management and security
② user management and security
grant privilege on schema.table to ‘username’@’ip’ ;
grant privilege on schema.tableto ‘username’@’host’;
grant privilege on schema.table to ‘username’@’%’ ;
flush privileges;
www.BlueGecko.net
② user management and security
use minimal privileges
www.BlueGecko.net
③storage engines
InnoDBMyISAMmergeblackholearchivefederated
www.BlueGecko.net
③and locking
InnoDBMyISAM
www.BlueGecko.net
③and locking
www.BlueGecko.net
④backups
take them 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
⑤monitoring
MySQL enterprise monitorNagios / Munin
key alerts-connections,caches, locking,server metrics
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
• cardboard people – sindykids• no translating – mdid• security robot - kapungo• storage- shuttercat7• clones – adactio• license plate - severud• tools – meanestindian• console - hermzz
other• swap image
– http://www.vocw.edu.vn/content/m10106/latest/
www.BlueGecko.net
Blue Gecko and contact info
• [email protected]• [email protected]• @sarahnovotny• @bluegecko• senk on #mysql• sarahnovotny on slideshare
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.