0
you know databases (how hard can MySQL be?) sarah novotny –  [email_address] open database services www .BlueGecko . net
<ul><li>language </li></ul><ul><li>user management and security </li></ul><ul><li>storage engines and locking </li></ul><u...
<ul><li>common language </li></ul>www .BlueGecko . net schema  instance SGA/PGA/UGA filesystem layout
<ul><li>SGAish </li></ul><ul><li>max_memory = </li></ul><ul><li>thread_memory * max_connections </li></ul><ul><li>+ query_...
<ul><li>UGAish </li></ul><ul><li>thread_memory =  </li></ul><ul><li>thread_stack_size  </li></ul><ul><li>+ net_buffer_leng...
www .BlueGecko . net <ul><li>common language </li></ul>
www .BlueGecko . net <ul><li>common language </li></ul>
<ul><li>a short diversion </li></ul><ul><li>from High Performance  </li></ul><ul><li>MySQL 2 nd  Edition  (HPM2e) </li></u...
www .BlueGecko . net <ul><li>user management and security  </li></ul>
<ul><li>user management and security </li></ul><ul><li>grant privilege on schema.table  </li></ul><ul><li>to ‘username’@’i...
<ul><li>user management and security </li></ul><ul><li>use minimal privileges  </li></ul>www .BlueGecko . net
<ul><li>storage engines </li></ul><ul><li>InnoDB </li></ul><ul><li>MyISAM </li></ul><ul><li>merge </li></ul><ul><li>blackh...
<ul><li>and locking </li></ul><ul><li>InnoDB </li></ul><ul><li>MyISAM </li></ul>www .BlueGecko . net
<ul><li>and locking </li></ul>www .BlueGecko . net
<ul><li>backups </li></ul><ul><li>take them </li></ul><ul><li>test a restore </li></ul>www .BlueGecko . net
<ul><li>backups </li></ul><ul><li>mysqldump is not always a valid backup </li></ul><ul><li>replication is easiest  </li></...
<ul><li>backups </li></ul>www .BlueGecko . net
<ul><li>monitoring </li></ul><ul><li>MySQL enterprise monitor </li></ul><ul><li>Nagios / Munin </li></ul><ul><li>key alert...
<ul><li>another </li></ul><ul><li>short </li></ul><ul><li>diversion </li></ul><ul><li>to swap or </li></ul><ul><li>not  to...
<ul><li>free tools </li></ul><ul><li>Innotop </li></ul><ul><li>maatkit </li></ul><ul><li>MySQL proxy </li></ul><ul><li>mon...
additional resources <ul><li>irc.freenode.org </li></ul><ul><ul><li>#mysql </li></ul></ul><ul><ul><li>#maatkit </li></ul><...
credits <ul><li>flickr </li></ul><ul><li>cardboard people – sindykids </li></ul><ul><li>no translating – mdid </li></ul><u...
Blue Gecko and contact info <ul><li>[email_address] </li></ul><ul><li>[email_address] </li></ul><ul><li>@sarahnovotny </li...
Upcoming SlideShare
Loading in...5
×

you know databases, how hard can MySQL be?

1,693

Published on

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).

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,693
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
34
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide
  • datadir
  • best practices including removing test users, requiring passwords, not logging in as root,
  • •❑ inno - row with exception •❑ myi - table -- fast in some cases and search cases ( fast inserts? without lock )•❑federated - replication not multiple master. •❑ blackhole handy for logging without inserting into db or skipping a db for fake muliple master
  • Much performance pain come into play with lock contention
  • Much performance pain come into play with lock contention Names changed to protect the innocent
  • Understand MTR and see if you meet that goal. tarball /dump / cpio not a valid backup
  • •❑ tarball /dump / cpio not a valid backup •❑ replication•❑innohot•❑lvm backup script... lvmbackup? •❑ mysqldump = 100% inno ok. single transaction .•❑xtrabackup -- free innohot
  • LVM and slaves give easy opportunities for creating clones for testing
  • If you’re worried about swapping, use huge page support for mysql (linux doesn’t swap out huge pages
  • •❑ disk•❑memory•❑up/down•❑cachehit -- baseline defiinition•❑replication •❑ mktablesync•❑mkchecksum
  • Transcript of "you know databases, how hard can MySQL be?"

    1. 1. you know databases (how hard can MySQL be?) sarah novotny – [email_address] open database services www .BlueGecko . net
    2. 2. <ul><li>language </li></ul><ul><li>user management and security </li></ul><ul><li>storage engines and locking </li></ul><ul><li>backups and replicas </li></ul><ul><li>monitoring </li></ul><ul><li>free tools </li></ul>www .BlueGecko . net
    3. 3. <ul><li>common language </li></ul>www .BlueGecko . net schema instance SGA/PGA/UGA filesystem layout
    4. 4. <ul><li>SGAish </li></ul><ul><li>max_memory = </li></ul><ul><li>thread_memory * max_connections </li></ul><ul><li>+ query_cache_size </li></ul><ul><li>+ innodb_buffer_pool_size </li></ul><ul><li>+ innodb_additional_mem_pool_size </li></ul><ul><li>+ innodb_log_buffer_size </li></ul><ul><li>+ key_buffer_size </li></ul>www .BlueGecko . net <ul><li>common language </li></ul>
    5. 5. <ul><li>UGAish </li></ul><ul><li>thread_memory = </li></ul><ul><li>thread_stack_size </li></ul><ul><li>+ net_buffer_length </li></ul><ul><li>+ max_allowed_packet </li></ul><ul><li>+ read_buffer_size </li></ul><ul><li>+ join_buffer_size </li></ul><ul><li>+ tmp_table_size </li></ul><ul><li>+ myisam_sort_buffer_size </li></ul>www .BlueGecko . net <ul><li>common language </li></ul>
    6. 6. www .BlueGecko . net <ul><li>common language </li></ul>
    7. 7. www .BlueGecko . net <ul><li>common language </li></ul>
    8. 8. <ul><li>a short diversion </li></ul><ul><li>from High Performance </li></ul><ul><li>MySQL 2 nd Edition (HPM2e) </li></ul><ul><li>-Baron Schwartz, Peter Zaitsev, </li></ul><ul><li>Vadim Tkachenko, and Jeremy </li></ul><ul><li>Zawodny </li></ul><ul><li>(don’t mistake 1 st Edition for 2 nd. </li></ul><ul><li>1 st is dangerously out of date </li></ul><ul><li>unless you’re running version 4.0) </li></ul>www .BlueGecko . net
    9. 9. www .BlueGecko . net <ul><li>user management and security </li></ul>
    10. 10. <ul><li>user management and security </li></ul><ul><li>grant privilege on schema.table </li></ul><ul><li>to ‘username’@’ip’ ; </li></ul><ul><li>grant privilege on schema.table </li></ul><ul><li>to ‘username’@’host’; </li></ul><ul><li>grant privilege on schema.table </li></ul><ul><li>to ‘username’@’%’ ; </li></ul><ul><li>flush privileges; </li></ul>www .BlueGecko . net
    11. 11. <ul><li>user management and security </li></ul><ul><li>use minimal privileges </li></ul>www .BlueGecko . net
    12. 12. <ul><li>storage engines </li></ul><ul><li>InnoDB </li></ul><ul><li>MyISAM </li></ul><ul><li>merge </li></ul><ul><li>blackhole </li></ul><ul><li>archive </li></ul><ul><li>federated </li></ul>www .BlueGecko . net
    13. 13. <ul><li>and locking </li></ul><ul><li>InnoDB </li></ul><ul><li>MyISAM </li></ul>www .BlueGecko . net
    14. 14. <ul><li>and locking </li></ul>www .BlueGecko . net
    15. 15. <ul><li>backups </li></ul><ul><li>take them </li></ul><ul><li>test a restore </li></ul>www .BlueGecko . net
    16. 16. <ul><li>backups </li></ul><ul><li>mysqldump is not always a valid backup </li></ul><ul><li>replication is easiest </li></ul><ul><li>(and it gets you a warm standby) </li></ul><ul><li>InnoDB hot backup </li></ul><ul><li>XtraBackup </li></ul><ul><li>mylvmbackup </li></ul>www .BlueGecko . net
    17. 17. <ul><li>backups </li></ul>www .BlueGecko . net
    18. 18. <ul><li>monitoring </li></ul><ul><li>MySQL enterprise monitor </li></ul><ul><li>Nagios / Munin </li></ul><ul><li>key alerts - </li></ul><ul><li>connections, </li></ul><ul><li>caches, locking </li></ul><ul><li>server metrics </li></ul>www .BlueGecko . net
    19. 19. <ul><li>another </li></ul><ul><li>short </li></ul><ul><li>diversion </li></ul><ul><li>to swap or </li></ul><ul><li>not to swap </li></ul><ul><li>that is the </li></ul><ul><li>question </li></ul>www .BlueGecko . net
    20. 20. <ul><li>free tools </li></ul><ul><li>Innotop </li></ul><ul><li>maatkit </li></ul><ul><li>MySQL proxy </li></ul><ul><li>monitoring/trending </li></ul><ul><li>cacti templates </li></ul><ul><li>$monitoring_server </li></ul><ul><li> – the one you know </li></ul>www .BlueGecko . net
    21. 21. additional resources <ul><li>irc.freenode.org </li></ul><ul><ul><li>#mysql </li></ul></ul><ul><ul><li>#maatkit </li></ul></ul><ul><li>mysql.com </li></ul><ul><li>HPM2e - Baron Schwartz, Peter Zaitsev, Vadim Tkachenko, and Jeremy Zawodny </li></ul>www .BlueGecko . net
    22. 22. credits <ul><li>flickr </li></ul><ul><li>cardboard people – sindykids </li></ul><ul><li>no translating – mdid </li></ul><ul><li>security robot - kapungo </li></ul><ul><li>storage- shuttercat7 </li></ul><ul><li>clones – adactio </li></ul><ul><li>license plate - severud </li></ul><ul><li>tools – meanestindian </li></ul><ul><li>console - hermzz </li></ul><ul><li>other </li></ul><ul><li>swap image </li></ul><ul><ul><li>http://www.vocw.edu.vn/content/m10106/latest/ </li></ul></ul>www .BlueGecko . net
    23. 23. Blue Gecko and contact info <ul><li>[email_address] </li></ul><ul><li>[email_address] </li></ul><ul><li>@sarahnovotny </li></ul><ul><li>@bluegecko </li></ul><ul><li>senk on #mysql </li></ul><ul><li>sarahnovotny on slideshare </li></ul>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.
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×