Over-the-Top Tales from the Trenches: Bringing order to the chaos of every day DBA life – So you have got your nice MySQL Master-Slave replication pair setup. Everything is sweet, then the master dies/restarts or you have a slightly extended network outage. You log into the machine and check out why the slave threw an error or if your monitoring is slow, why the slave is lagging by 2 hours. You run SHOW SLAVE STATUS\G
One of my colleagues made a typo in a query today that led to me discovering this issue — I think it’s a bug, though it may just be how the language is defined. But certainly a subquery that cannot run should not act as if it returns TRUE. Part of me thinks there’s an implicit join going on or something, but I’m not sure how that’s working. Have a look.
I spent way too long figuring out code that would simply load balance based on, always go to one server, go to another server only when the first server is down., again running into the problem where the manual hasn’t been updated. I have made a Forge snippet of this code, but it does not hurt to post it here.
While doing a standard audit for a new client, I recommended a few changes to get better performance. Because I had several changes, I used the documentation and found that innodb_flush_log_at_trx_commit is a dynamic variable. I was surprised, because most operations dealing with file sizes and operations are not dynamic. So I searched for others who may have had the same error, and ended up getting an unintentional googlewhack.
Calling a group of people with common interests “community” is just as meaningless as saying I live in a “neighborhood”. There has to be a bond there. I am proud to be a part of the MySQL Community, which actually has forged bonds. If you are new to the MySQL community, feel free to come up and talk to me (or anyone, really) — during the conference, or otherwise. Even if you feel you have nothing to say, just say hello. And I must end with a disclaimer: I won last year’s “Community Advocate” award from MySQL, so I guess all in all, I’m still a community advocate.
The answers to the last pop quiz are up. So here’s another pop quiz…good luck!
In Spotting the Wolf in Sheep’s Clothing, Frank Mash writes about a specific person who is spreading fear, uncertainty and doubt about MySQL. Now, this always gets me, especially with MySQL. For how long will MySQL be the bastard stepchild of the database world? Because really, it’s been a full-fledged DBMS for at least 5 years. Don’t hate MySQL for the wrong reasons and there are plenty of reasons to hate MySQL. But hating MySQL because “it sucks” or because “it doesn’t have blah feature” — which, 9 times out of 10, it has — is just wrong.
I was asked this question recently, and I thought it was a great little tidbit of knowledge to pass along. The short answer is “no”. The slightly longer answer was written up by Jan Kneschke when dealing with a forum post about proxy + connection pooling.
At this year’s MySQL Conference & Expo, taking place in Santa Clara, California in mid-April, I’m giving two sessions: Best Practices for Database Administrators,Database Security Using White-Hat Google Hacking. You can see more info about me here, including descriptions of the workshops.
Here’s another question that came to me about 2 weeks ago from a user group member that I never had time to research and answer. I have directed the original author to this post so questions you pose in the comments can be answered.