you know databases, how hard can mysql be?

23
you know databases (how hard can MySQL be?) sarah novotny – [email protected] open database services www.BlueGecko.net

Upload: sarahnovotny

Post on 08-May-2015

1.639 views

Category:

Technology


0 download

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

Page 1: you know databases, how hard can MySQL be?

you know databases

(how hard can MySQL be?)

sarah novotny – [email protected] database services

www.BlueGecko.net

Page 2: you know databases, how hard can MySQL be?

①language②user management and security③storage engines and locking④backups and replicas⑤monitoring⑥free tools

www.BlueGecko.net

Page 3: you know databases, how hard can MySQL be?

① common language

www.BlueGecko.net

schema instanceSGA/PGA/UGA

filesystem layout

Page 4: you know databases, how hard can MySQL be?

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

Page 5: you know databases, how hard can MySQL be?

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

Page 6: you know databases, how hard can MySQL be?

www.BlueGecko.net

① common language

Page 7: you know databases, how hard can MySQL be?

www.BlueGecko.net

① common language

Page 8: you know databases, how hard can MySQL be?

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 9: you know databases, how hard can MySQL be?

www.BlueGecko.net

② user management and security

Page 10: you know databases, how hard can MySQL be?

② 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

Page 11: you know databases, how hard can MySQL be?

② user management and security

use minimal privileges

www.BlueGecko.net

Page 12: you know databases, how hard can MySQL be?

③storage engines

InnoDBMyISAMmergeblackholearchivefederated

www.BlueGecko.net

Page 13: you know databases, how hard can MySQL be?

③and locking

InnoDBMyISAM

www.BlueGecko.net

Page 14: you know databases, how hard can MySQL be?

③and locking

www.BlueGecko.net

Page 15: you know databases, how hard can MySQL be?

④backups

take them test a restore

www.BlueGecko.net

Page 16: you know databases, how hard can MySQL be?

④backups

mysqldump is not always a valid backupreplication is easiest

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

www.BlueGecko.net

Page 17: you know databases, how hard can MySQL be?

④backups

www.BlueGecko.net

Page 18: you know databases, how hard can MySQL be?

⑤monitoring

MySQL enterprise monitorNagios / Munin

key alerts-connections,caches, locking,server metrics

www.BlueGecko.net

Page 19: you know databases, how hard can MySQL be?

anothershortdiversion

to swap ornot to swap that is the question

www.BlueGecko.net

Page 20: you know databases, how hard can MySQL be?

⑥free tools

InnotopmaatkitMySQL proxymonitoring/trending

cacti templates$monitoring_server – the one you know

www.BlueGecko.net

Page 21: you know databases, how hard can MySQL be?

additional resources

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

• mysql.com• HPM2e -Baron Schwartz,

Peter Zaitsev, Vadim Tkachenko, and Jeremy Zawodny

www.BlueGecko.net

Page 22: you know databases, how hard can MySQL be?

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

Page 23: you know databases, how hard can MySQL be?

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.