Everyone's Blog Posts - Everything MySQL2024-03-19T07:53:11Zhttp://everythingmysql.ning.com/profiles/blog/feed?xn_auth=noMySQL & Hadoop talk at Oracle Open Worldtag:everythingmysql.ning.com,2011-10-13:3993569:BlogPost:122062011-10-13T20:54:18.000ZSarah Sproehnlehttp://everythingmysql.ning.com/profile/SarahSproehnle
<p>I recently gave a talk about importing and exporting data between MySQL and Hadoop at Oracle Open World. Here are the slides for that talk:</p>
<p><a target="_self" href="http://storage.ning.com/topology/rest/1.0/file/get/74244782?profile=original">MySQLandHadoopNov2011.pdf</a></p>
<p>I recently gave a talk about importing and exporting data between MySQL and Hadoop at Oracle Open World. Here are the slides for that talk:</p>
<p><a target="_self" href="http://storage.ning.com/topology/rest/1.0/file/get/74244782?profile=original">MySQLandHadoopNov2011.pdf</a></p>Ning Tech Talk on MySqL - Date Correctiontag:everythingmysql.ning.com,2011-06-28:3993569:BlogPost:79012011-06-28T18:36:44.000ZChrishttp://everythingmysql.ning.com/profile/Chris
<div><p>Apologies for the scheduling conflict but the date has moved to the 20th of July.</p>
<p> </p>
<p><strong>Save the date: July 20, 2011</strong></p>
<p><strong>RSVP here: </strong><a href="http://www.meetup.com/Ning-Tech-Talks/events/22611151/" target="_blank">Ning-Tech-Talks</a></p>
<br></br>
<p><span>There have been many database infrastructure changes through Ning’s history since the company began in 2004. Our most recent, and hopefully final, database iteration is running on MySQL. Over…</span></p>
</div>
<div><p>Apologies for the scheduling conflict but the date has moved to the 20th of July.</p>
<p> </p>
<p><strong>Save the date: July 20, 2011</strong></p>
<p><strong>RSVP here: </strong><a href="http://www.meetup.com/Ning-Tech-Talks/events/22611151/" target="_blank">Ning-Tech-Talks</a></p>
<br/>
<p><span>There have been many database infrastructure changes through Ning’s history since the company began in 2004. Our most recent, and hopefully final, database iteration is running on MySQL. Over the past year we’ve designed and implemented a stable and highly available MySQL environment. MySQL was chosen to reduce Ning’s total cost of ownership and increase overall availability to our customers, Network Creators and their members.</span></p>
<p> </p>
<p>Led by Chris Schneider, Ning’s MySQL Architect, join us at this Ning Tech Talk as he explains how we implemented and currently maintain MySQL on the Ning Platform.</p>
<p> </p>
<p><span>Pizza, beer and other refreshments will be served. We'll begin with a quick series of informal "Lightning Talks" -- guests can present active projects or interests they're working on. If you'd like to present, there's a spot to propose your topic when you RSVP. There will also be time to ask Ning's Engineering and Ops teams any burning questions you have! We look forward to seeing you at <a target="_blank" href="http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=285+Hamilton+Ave,+Palo+Alto,+CA+94301&aq=0&sll=37.0625,-95.677068&sspn=76.360484,74.882813&ie=UTF8&hq=&hnear=285+Hamilton+Ave,+Palo+Alto,+Santa+Clara,+California+94301&z=17">Ning HQ</a> in downtown Palo Alto!</span></p>
<p> </p>
<p>Hope to see you there.</p>
<p> </p>
<p>Chris</p>
<p> </p>
</div>How We Implemented & Currently Maintain MySQL on the Ning Platformtag:everythingmysql.ning.com,2011-06-20:3993569:BlogPost:76012011-06-20T17:00:00.000ZChrishttp://everythingmysql.ning.com/profile/Chris
<p><strong>MySQL Ning Meetup Coming Soon</strong></p>
<p> </p>
<p>Save the date: July 20, 2011</p>
<p>RSVP here: <a href="http://www.meetup.com/Ning-Tech-Talks/events/22611151/" target="_blank">Ning-Tech-Talks</a></p>
<p> </p>
<br></br>
<p><span>There have been many database infrastructure changes through Ning’s history since the company began in 2004. Our most recent, and hopefully final, database iteration is running on MySQL. Over the past year we’ve designed and implemented a stable and highly…</span></p>
<p><strong>MySQL Ning Meetup Coming Soon</strong></p>
<p> </p>
<p>Save the date: July 20, 2011</p>
<p>RSVP here: <a target="_blank" href="http://www.meetup.com/Ning-Tech-Talks/events/22611151/">Ning-Tech-Talks</a></p>
<p> </p>
<br/>
<p><span>There have been many database infrastructure changes through Ning’s history since the company began in 2004. Our most recent, and hopefully final, database iteration is running on MySQL. Over the past year we’ve designed and implemented a stable and highly available MySQL environment. MySQL was chosen to reduce Ning’s total cost of ownership and increase overall availability to our customers, Network Creators and their members.</span></p>
<p> </p>
<p>Led by Chris Schneider, Ning’s MySQL Architect, join us at this Ning Tech Talk as he explains how we implemented and currently maintain MySQL on the Ning Platform.</p>
<p> </p>
<p><span>Pizza, beer and other refreshments will be served. We'll begin with a quick series of informal "Lightning Talks" -- guests can present active projects or interests they're working on. If you'd like to present, there's a spot to propose your topic when you RSVP. There will also be time to ask Ning's Engineering and Ops teams any burning questions you have! We look forward to seeing you at <a href="http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=285+Hamilton+Ave,+Palo+Alto,+CA+94301&aq=0&sll=37.0625,-95.677068&sspn=76.360484,74.882813&ie=UTF8&hq=&hnear=285+Hamilton+Ave,+Palo+Alto,+Santa+Clara,+California+94301&z=17" target="_blank">Ning HQ</a> in downtown Palo Alto!</span></p>
<p> </p>
<p>Hope to see you there.</p>
<p> </p>
<p>Chris</p>
<p> </p>
<p> </p>Comparing MySQL Statement-Based and Row-Based Replicationtag:everythingmysql.ning.com,2011-02-09:3993569:BlogPost:48012011-02-09T22:15:19.000ZChrishttp://everythingmysql.ning.com/profile/Chris
<div style="margin: 20px;"><p><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><em>There are many ways you can replicate MySQL data, whether it be a simple two-node cluster, chain or master/master. This article explains the two types of data replication (Statement-Based Replication and Row-Based Replication) available in MySQL.…</em></font></font></p>
</div>
<p></p>
<div style="margin: 20px;"><p><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><em>There are many ways you can replicate MySQL data, whether it be a simple two-node cluster, chain or master/master. This article explains the two types of data replication (Statement-Based Replication and Row-Based Replication) available in MySQL.</em></font></font></p>
</div>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1">There are many ways you can replicate MySQL <a style="font-weight: normal; font-size: 100%; text-decoration: underline; border-bottom: 0.075em solid darkgreen; padding-bottom: 1px; color: darkgreen; background-color: transparent;" class="itxtrst itxtrsta itxthook" href="http://www.databasejournal.com/features/mysql/article.php/3922266/Comparing-MySQL-Statement-Based-and-Row-Based-Replication.htm#" id="itxthook0" rel="nofollow" name="itxthook0"><span id="itxthook0w0" class="itxtrst itxtrstspan itxthookspan" style="background: none repeat scroll 0% 0% transparent; font-size: inherit; font-weight: inherit; color: darkgreen;">data</span></a> whether it be a simple two-node cluster, chain or master/master. If you use MySQL you probably know about replication and might have experimented with the replication layouts' listed above. In this article I will explain not the layout of replication and why or why not to use a specific layout but the types of replication you can use. In MySQL, you can use two types of replication, Statement-Based Replication (SBR) and Row-Based Replication (RBR).</font></font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1">In MySQL, replication is basically the slave <a style="font-weight: normal; font-size: 100%; text-decoration: underline; border-bottom: 0.075em solid darkgreen; padding-bottom: 1px; color: darkgreen; background-color: transparent;" class="itxtrst itxtrsta itxthook" href="http://www.databasejournal.com/features/mysql/article.php/3922266/Comparing-MySQL-Statement-Based-and-Row-Based-Replication.htm#" id="itxthook1" rel="nofollow" name="itxthook1"><span id="itxthook1w0" class="itxtrst itxtrstspan itxthookspan" style="background: none repeat scroll 0% 0% transparent; font-size: inherit; font-weight: inherit; color: darkgreen;">server</span></a> reading binary logs on the master server then running the statements or applying blocks to the slave server. Depending on the type of replication you are using, events are recorded in different formats to the binary log. Below are the different formats explained:</font></font></p>
<ul type="disc">
<li style="list-style: none"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1">
</font></font></li>
<li><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1">At first, replication was based on propagation of <a style="font-weight: normal; font-size: 100%; text-decoration: underline; border-bottom: 0.075em solid darkgreen; padding-bottom: 1px; color: darkgreen; background-color: transparent;" class="itxtrst itxtrsta itxthook" href="http://www.databasejournal.com/features/mysql/article.php/3922266/Comparing-MySQL-Statement-Based-and-Row-Based-Replication.htm#" id="itxthook2" rel="nofollow" name="itxthook2"><span id="itxthook2w0" class="itxtrst itxtrstspan itxthookspan" style="background: none repeat scroll 0% 0% transparent; font-size: inherit; font-weight: inherit; color: darkgreen;">SQL</span></a> statements from the master server to the slave server. This replication format is called statement-based replication (SBR) and is default in older versions of MySQL (<= 5.1.4). Just as a note that in later versions of MySQL, especially with the <a href="http://www.innodb.com/">Innodb Plugin</a>, you NEED to run your <a href="http://dev.mysql.com/doc/refman/5.0/en/set-transaction.html">transaction_isolation</a> with REPEATABLE-READ.</font></font></li>
<li><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1">The newer replication type is row-based replication (RBR), which logs changes in individual table rows to the binary log. Basically, logging the actual change and not the SQL statement itself.</font></font></li>
<li><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1">MySQL also has the ability to change its binary logging format <a style="font-weight: normal; font-size: 100%; text-decoration: underline; border-bottom: 0.075em solid darkgreen; padding-bottom: 1px; color: darkgreen; background-color: transparent;" class="itxtrst itxtrsta itxthook" href="http://www.databasejournal.com/features/mysql/article.php/3922266/Comparing-MySQL-Statement-Based-and-Row-Based-Replication.htm#" id="itxthook3" rel="nofollow" name="itxthook3"><span id="itxthook3w0" class="itxtrst itxtrstspan itxthookspan" style="background: none repeat scroll 0% 0% transparent; font-size: inherit; font-weight: inherit; color: darkgreen;">in</span> <span id="itxthook3w1" class="itxtrst itxtrstspan itxthookspan" style="background: none repeat scroll 0% 0% transparent; font-size: inherit; font-weight: inherit; color: darkgreen;"></span><span id="itxthook3w2" class="itxtrst itxtrstspan itxthookspan" style="background: none repeat scroll 0% 0% transparent; font-size: inherit; font-weight: inherit; color: darkgreen;">real</span> <span id="itxthook3w3" class="itxtrst itxtrstspan itxthookspan" style="background: none repeat scroll 0% 0% transparent; font-size: inherit; font-weight: inherit; color: darkgreen;"></span><span id="itxthook3w4" class="itxtrst itxtrstspan itxthookspan" style="background: none repeat scroll 0% 0% transparent; font-size: inherit; font-weight: inherit; color: darkgreen;">time</span></a> depending on the type of event using the mixed format binary logging. When the mixed format is turned on, statement-based replication is on by default but will change to row-based replication is particular cases. For more information on Mixed Binary Logging please see <a href="http://dev.mysql.com/doc/refman/5.1/en/binary-log-mixed.html">Mixed Binary Logging Format</a> in the MySQL Documentation.</font></font></li>
</ul>
<p> </p>
<p><a href="http://www.databasejournal.com/features/mysql/article.php/3922266/Comparing-MySQL-Statement-Based-and-Row-Based-Replication.htm" target="_blank">Please click here for the full article.</a></p>
<div style="margin-left: 2em"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1">
</font></font><br />
</div>MySQL Workbench - Top 13 things you should knowtag:everythingmysql.ning.com,2011-01-05:3993569:BlogPost:37022011-01-05T20:30:00.000ZChrishttp://everythingmysql.ning.com/profile/Chris
<p><em><font size="-1"><font face="Verdana, Arial, Helvetica, sans-serif">MySQL Workbench has come a long way and keeps getting better! I honestly don't think that millage may vary on this one as it is one of the best no-cost GUI tools created for MySQL.</font></font></em></p>
<p><em><font size="-1"><font face="Verdana, Arial, Helvetica, sans-serif"><br></br>I've always been pro command line for MySQL administration; however, there have always been powerful GUI tools that can aid administration,…</font></font></em></p>
<p><em><font size="-1"><font face="Verdana, Arial, Helvetica, sans-serif">MySQL Workbench has come a long way and keeps getting better! I honestly don't think that millage may vary on this one as it is one of the best no-cost GUI tools created for MySQL.</font></font></em></p>
<p><em><font size="-1"><font face="Verdana, Arial, Helvetica, sans-serif"><br/>I've always been pro command line for MySQL administration; however, there have always been powerful GUI tools that can aid administration, development and other tasks. Some great tools that I have used in the past are Toad, Navicat, phpmyadmin, and WebYog. Although all of the tools listed above are good I have had a lot of success with MySQL Workbench, plus it's free.</font></font></em></p>
<p><em><font size="-1"><font face="Verdana, Arial, Helvetica, sans-serif"><br/>I should also note that when I do use MySQL Workbench it's more for my QA, test and development MySQL instances. Call me crazy but I think it's just too easy to inadvertently damage production with how easy this tool is to work with. Plus, in most environments you don't want a flock of users looking at production servers anyway. That said, I do recommend MySQL Workbench to my developers' and sometimes even a savvy manager as long as they are off my production servers.</font></font></em></p>
<p><em><font size="-1"><font face="Verdana, Arial, Helvetica, sans-serif"><br/>A full feature list can be found here. If you do venture to the feature list page, you should notice that there are few differences between the MySQL Workbench Community Edition (Open Source (GPL License)) and the commercial software version, MySQL Workbench Standard Edition (commercial software). Support for the standard addition is also offered on all levels of MySQL Support. There is a lot inside the MySQL Workbench so this makes it more of a set of GUI tools.<br/>Here are the three main tools:<br/> • SQL Development<br/> • Data Modeling<br/> • Serer Administration</font></font></em></p>
<p> </p>
<p><em><font size="-1"><font face="Verdana, Arial, Helvetica, sans-serif"><a href="http://www.databasejournal.com/features/mysql/article.phpr/3918776/article.htm" target="_blank">See the full Top 13 list here...</a><br/></font></font></em></p>Call for Participation - OSCON 2011tag:everythingmysql.ning.com,2010-12-27:3993569:BlogPost:36012010-12-27T15:00:00.000ZChrishttp://everythingmysql.ning.com/profile/Chris
<h1 style="color: #cb0830; font-size: 1.4em; font-weight: normal; line-height: 1.2em;"><strong><span style="color: #000000; font-family: verdana,geneva;">Submit a Proposal to Speak at OSCON</span></strong></h1>
<p style="font-family: Arial,Verdana,Helvetica,sans-serif; font-size: 12px; line-height: 16px; color: #333333; padding: 5px 0pt;"> …</p>
<p style="font-family: Arial,Verdana,Helvetica,sans-serif; font-size: 12px; line-height: 16px; color: #333333; padding: 5px 0pt;"></p>
<h1 style="color: #cb0830; font-size: 1.4em; font-weight: normal; line-height: 1.2em;"><strong><span style="color: #000000; font-family: verdana,geneva;">Submit a Proposal to Speak at OSCON</span></strong></h1>
<p style="font-family: Arial,Verdana,Helvetica,sans-serif; font-size: 12px; line-height: 16px; color: #333333; padding: 5px 0pt;"> </p>
<p style="font-family: Arial,Verdana,Helvetica,sans-serif; font-size: 12px; line-height: 16px; color: #333333; padding: 5px 0pt;"><span style="font-family: verdana,geneva;">OSCON is looking for speakers to lead sessions and tutorials during the 2011 conference. <a href="http://post.oreilly.com/rd/9z1zrhljd43q0ap9t2nrr0q3ohq1u78f2mh9qm00uh0" style="color: #016bb9; text-decoration: none;" target="_blank">The Call for Participation is open now through February 7</a>.</span></p>
<p style="font-family: Arial,Verdana,Helvetica,sans-serif; font-size: 12px; line-height: 16px; color: #333333; padding: 5px 0pt;"><span style="font-family: verdana,geneva;"><br/></span></p>
<h3 style="padding: 0pt; font-size: 1.1em; line-height: 1em; color: #cb0830; text-align: left;"><span style="color: #000000; font-family: verdana,geneva;">Topics They're Looking For</span></h3>
<p style="font-family: Arial,Verdana,Helvetica,sans-serif; font-size: 12px; line-height: 16px; color: #333333; padding: 5px 0pt;"> </p>
<p style="font-family: Arial,Verdana,Helvetica,sans-serif; font-size: 12px; line-height: 16px; color: #333333; padding: 5px 0pt;"><span style="font-family: verdana,geneva;">Topics we plan to explore in the 2011 program include:</span></p>
<p style="font-family: Arial,Verdana,Helvetica,sans-serif; font-size: 12px; line-height: 16px; color: #333333; padding: 5px 0pt;"><span style="font-family: verdana,geneva;"><br/></span></p>
<ul>
<li><span style="font-family: verdana,geneva;">Doing more with less, a perpetual favorite</span></li>
<li><span style="font-family: verdana,geneva;">Open source in smart phones and mobile networked devices</span></li>
<li><span style="font-family: verdana,geneva;">Cloud computing, openness in distributed services</span></li>
<li><span style="font-family: verdana,geneva;">Geek lifestyle – hacking, quantified self, inbox zero, maker culture</span></li>
<li><span style="font-family: verdana,geneva;">Best practices for building a business around open source</span></li>
<li><span style="font-family: verdana,geneva;">Open web, open standards, open data, open, open, open!</span></li>
<li><span style="font-family: verdana,geneva;">Open source in democracy, politics, government, and education</span></li>
<li><span style="font-family: verdana,geneva;">AI, machine learning, and other ways of making software smarter than the people using it</span></li>
</ul>
<p> </p>
<ul style="padding: 0pt;">
</ul>
<p style="font-family: Arial,Verdana,Helvetica,sans-serif; font-size: 12px; line-height: 16px; color: #333333; padding: 5px 0pt;"><span style="font-family: verdana,geneva;">These topics are just to get you started. But OSCON is open to other ideas as well. <a href="http://post.oreilly.com/rd/9z1z05u59i7vf6jfafsq5shunnm9eg06rjdm9h44pi8" style="color: #016bb9; text-decoration: none;" target="_blank">View submissions guidelines and submit your proposal</a>.</span></p>KSCOPE11 - ODTUG Conference June 2011tag:everythingmysql.ning.com,2010-12-20:3993569:BlogPost:32052010-12-20T15:30:00.000ZChrishttp://everythingmysql.ning.com/profile/Chris
<p>Hey everyone,</p>
<p></p>
<p>I always attend the <a href="http://en.oreilly.com/mysql2011/" target="_blank">O'REILLY MySQL Conference</a> in April every year, but this year found another interesting conference that brings both Oracle and MySQL users together, <a href="http://joomla.kscope11.com/mysql" target="_blank">KSCOPE11</a>. This will be the second year with a dedicated MySQL track at Kscope11. There will be a clear focus on providing both developers and DBAs the right information,…</p>
<p>Hey everyone,</p>
<p></p>
<p>I always attend the <a href="http://en.oreilly.com/mysql2011/" target="_blank">O'REILLY MySQL Conference</a> in April every year, but this year found another interesting conference that brings both Oracle and MySQL users together, <a href="http://joomla.kscope11.com/mysql" target="_blank">KSCOPE11</a>. This will be the second year with a dedicated MySQL track at Kscope11. There will be a clear focus on providing both developers and DBAs the right information, tools and best practices within MySQL, emphasizing scalability and performance.</p>
<p></p>
<p>I'll be presenting "MySQL HA Possibilites" at <a href="http://joomla.kscope11.com/mysql" target="_blank">KSCOPE11</a> next June.</p>
<p></p>
<p><span style="color: #000000;"><span style="color: #000000;"><span style="color: #000000;"><strong><span style="font-size: 10pt;"><br/></span></strong><span style="font-size: 10pt;">T</span>his talk will cover high availability techniques, sharding fundamentals, third party technologies, and how to decrease the likelihood of system outages<br/></span></span></span></p>
<p></p>
<p><span style="color: #000000;"><span style="color: #000000;">* High availability overview and terms <br/>* Scale up and scale out<br/>* Levels of availability<br/>* Failover mechanisms you should consider with replication (i.e. keepalived, heartbeat)<br/>* Hardware specifications to consider<br/>* DRBD, Heartbeat, and MySQL<br/>* MySQL Cluster</span></span></p>
<p></p>
<p><span style="color: #000000;"><span style="color: #000000;">Hope to see you there!</span></span></p>
<p></p>
<p><span style="color: #000000;"><span style="color: #000000;">Chris<br/></span></span></p>
<p></p>Simple Automation - Examining your MySQL Index Usagetag:everythingmysql.ning.com,2010-12-14:3993569:BlogPost:34052010-12-14T18:19:18.000ZChrishttp://everythingmysql.ning.com/profile/Chris
<p>I have a new article posted on the Database Journal...</p>
<p></p>
<p><span style="font-family: verdana,geneva;">- Abstract -</span></p>
<p><span style="font-family: verdana,geneva;">In the majority of MySQL systems, the schema is always updated and changed based on the needs and focus of the application, making it somewhat difficult to keep up with all of the changes that come down the pipe.…</span></p>
<p><span style="font-family: verdana,geneva;"><br></br></span></p>
<p></p>
<p>I have a new article posted on the Database Journal...</p>
<p></p>
<p><span style="font-family: verdana,geneva;">- Abstract -</span></p>
<p><span style="font-family: verdana,geneva;">In the majority of MySQL systems, the schema is always updated and changed based on the needs and focus of the application, making it somewhat difficult to keep up with all of the changes that come down the pipe.</span></p>
<p><span style="font-family: verdana,geneva;"><br/></span></p>
<p><span style="font-family: verdana,geneva;">Knowing how to index a schema based on the queries using the system is a great skill to have. In the majority of the systems I have worked on, the schema is always updated and changed based on the needs and focus of the application. That said, it can be somewhat difficult to keep up with all of the changes that come down the pipe, especially if there are many changes every week. To help identify the indexes that are being used there are a few tools out there to help. One of the best resides in the <a href="http://www.maatkit.org/">MAAKIT</a> called, <a href="http://www.maatkit.org/doc/mk-index-usage.html">mk-index-usage</a>.</span></p>
<p></p>
<p><span style="font-family: verdana,geneva;">To see the full article on the</span> Database Journal <span style="font-family: verdana,geneva;">please click <a href="http://www.databasejournal.com/features/mysql/article.php/3910466/Simple-Automation---Examining-your-MySQL-Index-Usage.htm" target="_blank">here</a>.</span></p>Ning is looking for Talented Peopletag:everythingmysql.ning.com,2010-10-27:3993569:BlogPost:26012010-10-27T21:01:03.000ZChrishttp://everythingmysql.ning.com/profile/Chris
<font color="#040404"><font face="Calibri, Verdana, Helvetica, Arial" size="3"><span style="font-size: 11pt;">Hi Friends<br></br>
<br></br>
I wanted to let you know that my employer Ning is Hiring!</span></font> <font face="Calibri, Verdana, Helvetica, Arial" size="3"><span style="font-size: 11pt;">Ning is the largest platform in the world for creating your own custom social network. It's an exciting time to be a part of Ning since we recently decided to focus 100% of the energy of the company on our…</span></font></font>
<font color="#040404"><font face="Calibri, Verdana, Helvetica, Arial" size="3"><span style="font-size: 11pt;">Hi Friends<br/>
<br/>
I wanted to let you know that my employer Ning is Hiring!</span></font> <font face="Calibri, Verdana, Helvetica, Arial" size="3"><span style="font-size: 11pt;">Ning is the largest platform in the world for creating your own custom social network. It's an exciting time to be a part of Ning since we recently decided to focus 100% of the energy of the company on our premium subscription business. Our platform now has over 70,000 paid subscribers, up from 15,000 from before transition from our “freemium” model, and we are currently seeing 80 million monthly unique visitors globally.</span><br/>
<font color="#040404"><br/>
Because of this success, we are currently growing our organization and would love to chat with you about your background to see if there is a potential fit for our engineering team. We are hiring for a number of openings -- scalability/infrastructure engineers (We are in the top 100 largest sites in US), application developers (we have a number of killer consumer facing features to be built), system administrators (we manage 2000+ nodes in our production!), billing engineers (we have 70,000+ paying customers!), Analysts and more. We are looking for smart people who can learn, execute, and kick butt!<br/>
</font> <br/>
<font color="#040404">To take a sneak peak at Ning Engineering, check out</font> <a href="http://developer.ning.com"><font color="#0000FF"><u>http://developer.ning.com</u></font></a> <font color="#040404">and <a href="http://code.ning.com">http://code.ning.com</a>. I’ve also included some links to some of the recent videos/articles about the great things happening at Ning lately:<br/>
<br/>
Debut of Ning Everywhere<br/>
</font> <font color="#0000FF"><u><a href="http://tcrn.ch/9uwjIH">http://tcrn.ch/9uwjIH</a><br/>
</u></font> <font color="#040404"><br/>
<a href="http://CNBC.com/">CNBC.com</a></font><font color="#040404">'s list of 6 cool companies to work for<br/>
</font> <font color="#0000FF"><u><a href="http://www.cnbc.com/id/39573304/?slide=4">http://www.cnbc.com/id/39573304/?slide=4</a><br/>
</u></font> <u><font color="#401FFF"><br/>
</font></u> <font color="#040404">Recent videos on Fortune:<br/>
“We top Facebook for business”</font> <font color="#0000FF"><u><a href="http://bit.ly/byExue">http://bit.ly/byExue</a><br/>
</u></font> <font color="#040404">“Ning CEO: We’re profitable”</font> <font color="#0000FF"><u><a href="http://bit.ly/cm9lDM">http://bit.ly/cm9lDM</a><br/>
</u></font> <font color="#2911FF"><br/>
<br/>
</font> <font color="#040404">Please forward this message to anyone you think is exceptional.<br/><br/>
Any interested candidates should send their resumes directly to Scott Caito (recruiting)<br/>
</font> <font color="#0000FF"><u><a href="scottc@ning.com">scottc@ning.com</a><br/>
</u></font> <font color="#040404">skype: scottcaito<br/>
@scaito<br/>
</font> <font color="#0000FF"><u><a href="http://www.linkedin.com/in/scottcaito">Http://www.linkedin.com/in/scottcaito</a></u></font></font><br/>
</font>Call for participation - MySQL Conference 2011tag:everythingmysql.ning.com,2010-10-11:3993569:BlogPost:19102010-10-11T15:00:00.000ZChrishttp://everythingmysql.ning.com/profile/Chris
<p style="text-align: center;"><img alt="" src="http://storage.ning.com/topology/rest/1.0/file/get/74244823?profile=original"></img></p>
<p style="text-align: center;"><br></br></p>
<p style="text-align: center;">Gear up for the 2011 MySQL Conference! <br></br></p>
<p style="text-align: center;"><br></br></p>
<p style="text-align: center;">Get your presentations submitted soon<b>, Call closes 11:59pm 10/25/2010 PDT. …<br></br></b></p>
<p style="text-align: center;"><a href="http://en.oreilly.com/mysql2011/"><br></br></a></p>
<p style="text-align: center;"></p>
<p style="text-align: center;"><img src="http://storage.ning.com/topology/rest/1.0/file/get/74244823?profile=original" alt=""/></p>
<p style="text-align: center;"><br/></p>
<p style="text-align: center;">Gear up for the 2011 MySQL Conference! <br/></p>
<p style="text-align: center;"><br/></p>
<p style="text-align: center;">Get your presentations submitted soon<b>, Call closes 11:59pm 10/25/2010 PDT. <br/></b></p>
<p style="text-align: center;"><a href="http://en.oreilly.com/mysql2011/"><br/></a></p>
<p style="text-align: center;"><b><a href="http://en.oreilly.com/mysql2011/">2011 Conference Home Page</a></b></p>
<p style="text-align: center;"><a href="http://en.oreilly.com/mysql2011/public/cfp/126"><br/></a></p>
<p style="text-align: center;"><b><a href="http://en.oreilly.com/mysql2011/public/cfp/126">Submit a Paper</a></b></p>
<p><br/></p>
<p><b><br/></b></p>MySQL Enterprise Dashboard - It's Cool!tag:everythingmysql.ning.com,2010-10-07:3993569:BlogPost:19072010-10-07T22:17:05.000ZChrishttp://everythingmysql.ning.com/profile/Chris
<font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><em><br></br></em></font></font><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><em>I've been using MySQL Enterprise Monitor for some time now and have seen it grow from a somewhat clunky (ALPHA version) to a scalable and robust monitoring system. The MySQL Enterprise Monitor makes my job easier in a…</em></font></font>
<font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><em><br/></em></font></font><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><em>I've been using MySQL Enterprise Monitor for some time now and have seen it grow from a somewhat clunky (ALPHA version) to a scalable and robust monitoring system. The MySQL Enterprise Monitor makes my job easier in a number of ways. Below is a short list of what I love about MySQL Enterprise Monitor:<br/></em></font></font><span style="font-style: italic;"><br/></span><ol>
<li>Tunable, agent based monitoring</li>
<li>Historic RRD graphs</li>
<li>MySQL Query Analyzer</li>
<li>Replication topology visualization<br/></li>
</ol>
<span style="font-style: italic;"><br/></span><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><em>MySQL Enterprise Monitor was highlighted during "MySQL Sunday" at the Oracle Open World conference this past month. Given the ease of implementation and helpful GUI tools, <a href="http://www.mysql.com/products/enterprise/monitor.html" target="_blank">MySQLEnterprise Monitor</a> provides almost instant benefits for any MySQL shop.<br/>
</em></font></font> <br/>Check out the full article <a href="http://www.databasejournal.com/features/mysql/article.php/3905956/A-Look-Inside-MySQL-Enterprise-Monitor.htm">here</a>.<br/><br/>(<a href="http://www.databasejournal.com/features/mysql/article.php/3905956/A-Look-Inside-MySQL-Enterprise-Monitor.htm">http://www.databasejournal.com/features/mysql/article.php/3905956/A-Look-Inside-MySQL-Enterprise-Monitor.htm</a>)<br/><br/>Enjoy<br/>MySQL HA Presentation from Oracle's MySQL Sundaytag:everythingmysql.ning.com,2010-09-28:3993569:BlogPost:19022010-09-28T21:00:00.000ZChrishttp://everythingmysql.ning.com/profile/Chris
MySQL Sunday at Oracle's Open world was a huge success given that it was MySQL's first year at the conference. I had a lot of fun and even a little excitement when a shirt caught fire during my presentation. <br></br><br></br>Just added a video to the site for MySQL High Availability. Check it out <a href="http://everythingmysql.ning.com/video/chris-schneider-of-ning">here</a> if you missed it at MySQL Sunday, also, you can get the slides in PDF format…
MySQL Sunday at Oracle's Open world was a huge success given that it was MySQL's first year at the conference. I had a lot of fun and even a little excitement when a shirt caught fire during my presentation. <br/><br/>Just added a video to the site for MySQL High Availability. Check it out <a href="http://everythingmysql.ning.com/video/chris-schneider-of-ning">here</a> if you missed it at MySQL Sunday, also, you can get the slides in PDF format <a href="http://storage.ning.com/topology/rest/1.0/file/get/14835931?profile=original">here</a>.<br/><br/>You can also check out all the other presentations <a href="http://palominodb.com/blog/2010/09/28/videos-mysql-presentations-mysql-sunday-and-oracle-open-world">here</a>, brought to you by PalominoDB.<br/><br/>-- UPDATE --<br/>9-29-10<br/><br/>Recently I was contacted by a fellow community member at Oracle who had some great clarifications/corrections to the MySQL Cluster portion of my presentation. Here is long short:<br/><br/><span style="font-weight: bold; text-decoration: underline;">Problem #1:</span><br/><br/><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size: 11pt;">Geographical redundancy through MySQL replication (Asynchronous)<br/>
Can be a single point of failure.<br/>
<br/><span style="font-weight: bold;">Question:</span><br/>
How is this a SPOF? You can configure multiple replication channels,<br/>
with different sql nodes in the master cluster, and fail over between<br/>
them.<br/>
<br/><span style="font-weight: bold;">Answer:</span><br/>
<font color="#0000FF"><u><a href="http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-replication-two-channels.html">http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-replication-two-channels.html</a><br/>
<a href="http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-replication-failover.html">http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-replication-failover.html</a><br/>
</u></font> <br/><span style="font-weight: bold;">My Thoughts:<br/><br/></span>
</span></font><br />
I'll be a bit more careful next time in my use of "can be"!!!!<br/><br/><span style="font-weight: bold; text-decoration: underline;">Problem #2:</span><br/><br/>"<font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size: 11pt;">In Memory data storage<br/>
Does not work well for large datasets</span></font>"<br/><br/><span style="font-weight: bold;">Answer/Clarification:<br/><br/></span><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size: 11pt;">Non-indexed columns can be written to on-disk tablespaces since MySQL 5.1</span></font> (<a href="http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-limitations-disk-data.html">http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-limitations-disk-data.html</a>).<br/><span style="font-weight: bold;"><br/></span> <font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size: 11pt;">“Maximum data file size: The theoretical limit is 64G; however, in<br/>
MySQL 5.1 (including MySQL Cluster NDB 6.X and 7.X through 7.1), the<br/> practical upper limit is 32G. This is equivalent to 32768 extents of<br/>
1M each.”</span></font><br />
<br/><span style="font-weight: bold;"><br/>"</span><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size: 11pt;">Each on-disk data file has a practical max size of 32GB with each<br/>
tablespace having a maximum of 65536 files. This gives a practical<br/>
maximum size of 2TB per tablespace and theoretical max size of 4TB.<br/>
Each table could in theory be allocated its own tablespace with up to<br/>
2^32 (>4bn) tablespaces being allowed.</span></font>"<br/><span style="font-weight: bold;"><br/>My Thoughts:<br/><br/></span>Large data was an older generalization I used in the presentation. <br/><br/>Thanks a bunch for the clarification on this, Community Member from Oracle!<br/><br/>Chris<br/>MySQL Sunday - Oracle Open Worldtag:everythingmysql.ning.com,2010-07-14:3993569:BlogPost:18342010-07-14T18:00:34.000ZChrishttp://everythingmysql.ning.com/profile/Chris
The first ever MySQL Sunday is coming soon to the Bay Area. There are plenty of great speakers with new and interesting material to choose from. Come join us at Oracle's Open World conference and make sure to check out the <a href="http://www.oracle.com/us/openworld/mysql-sunday-078000.html">MySQL Sunday</a> page. <br/><br/>This is going to be a great event that you don't want to miss!<br/><br/>Have a great day and see you there.<br/><br/>Chris<br/>
The first ever MySQL Sunday is coming soon to the Bay Area. There are plenty of great speakers with new and interesting material to choose from. Come join us at Oracle's Open World conference and make sure to check out the <a href="http://www.oracle.com/us/openworld/mysql-sunday-078000.html">MySQL Sunday</a> page. <br/><br/>This is going to be a great event that you don't want to miss!<br/><br/>Have a great day and see you there.<br/><br/>Chris<br/>Hadoop for MySQL peopletag:everythingmysql.ning.com,2010-06-24:3993569:BlogPost:18162010-06-24T01:04:09.000ZSarah Sproehnlehttp://everythingmysql.ning.com/profile/SarahSproehnle
There's a lot of buzz lately about Hadoop. If you're completely new to Hadoop, I recommend the free videos from Cloudera (<a href="http://www.cloudera.com/resources/?type=Training">http://www.cloudera.com/resources/?type=Training</a>). If you have a vague idea and want to play around, it's easy!<div><br></br></div>
<div>First, download Cloudera's training VM which has a small Hadoop cluster already installed and running:…</div>
There's a lot of buzz lately about Hadoop. If you're completely new to Hadoop, I recommend the free videos from Cloudera (<a href="http://www.cloudera.com/resources/?type=Training">http://www.cloudera.com/resources/?type=Training</a>). If you have a vague idea and want to play around, it's easy!<div><br/></div>
<div>First, download Cloudera's training VM which has a small Hadoop cluster already installed and running:</div>
<div><a href="http://www.cloudera.com/developers/downloads/virtual-machine/">http://www.cloudera.com/developers/downloads/virtual-machine/</a></div>
<div><br/></div>
<div>Second, you need to put some data into Hadoop. Fortunately for database folks, there's a tool to import data into Hadoop from MySQL called "Sqoop". It's already installed on the VM and there are instructions for using Sqoop to import some MySQL tables into Hadoop (see Desktop/instructions/exercises/SqoopExercise.html inside the VM). FYI, it's not uncommon to "Sqoop" data into Hadoop, do analysis and transformations, and then use Sqoop to export the data back to MySQL.</div>
<div><br/></div>
<div>Now you're ready to do analysis of your data using Hadoop's powerful MapReduce. Except that MapReduce requires coding (Java, Python, PHP, etc) and an understanding of the functional programming model that is MapReduce. For an easier entry into Hadoop, try Hive. Hive is a data warehousing system for Hadoop. It offers a language (HiveQL) that feels just like SQL. Examples:</div>
<div><br/></div>
<div>$ hive</div>
<div>hive> SHOW TABLES;</div>
<div>hive> SELECT * FROM <table> LIMIT 10;</div>
<div><br/></div>
<div>Hive supports most of the SQL queries you are used to. For example JOIN, LEFT OUTER JOIN, RIGHT OUTER JOIN, GROUP BY, ORDER BY, aggregate functions, etc. The best part is that Hive can scale to analyze petabytes of data!</div>Using slide:ology colors in Entrancetag:everythingmysql.ning.com,2010-04-17:3993569:BlogPost:16302010-04-17T16:00:00.000ZTod Landishttp://everythingmysql.ning.com/profile/TodLandis
In this note I'll show how to use the color palettes in "slide:ology" by Nancy Duarte (those of us who spoke at the MySQl Conference received it as a nice gift from O'Reilly).<div><br></br></div>
<div>Step 1 is to download Entrance Community edition from our web site: <a href="http://dbentrance.com/">http://dbentrance.com/</a>. You need JRE 1.6 or better and access to a MySQL server to run it. Simply unzip the download and start the program with "java -jar…</div>
In this note I'll show how to use the color palettes in "slide:ology" by Nancy Duarte (those of us who spoke at the MySQl Conference received it as a nice gift from O'Reilly).<div><br/></div>
<div>Step 1 is to download Entrance Community edition from our web site: <a href="http://dbentrance.com/">http://dbentrance.com/</a>. You need JRE 1.6 or better and access to a MySQL server to run it. Simply unzip the download and start the program with "java -jar entrance.jar".</div>
<div><br/></div>
<div>To make a chart, click "New" and enter a PLOT command:</div>
<div><pre> plot</pre>
<pre> axislabels, red bar, blue bar, green bar</pre>
<pre> select "label", 1, 2, 3;<br/></pre>
The SELECT part of the command can be almost any MySQL SELECT statement. (e.g. unfortunately you can't change delimiters yet).</div>
<div><br/></div>
<div>Click "Run" and you have the chart. Now to replace those eye-scorching colors with something better from the book. Take a look at the section "Using the Power of Color" on pages 130-131 and you will find a collection of RGB values for color palettes. Any of these can be used in Entrance. For example, here is "Earthy":</div>
<pre> -- Earthy palette from slide:ology</pre>
<pre> plot </pre>
<pre> axislabels, rgb(72,107,28) bar, rgb(101,141,43) bar,</pre>
<pre> rgb(144,193,62) bar</pre>
<pre> select "label", 1, 2, 3;</pre>
<div>Once you have entered a palette you can copy and paste it as text to other scripts. Be careful not to put any spaces in the rgb() values or Entrance will complain, and be careful that the chart series you list in the "plot part" match up 1-to-1 with columns in the "select part".</div>
<div><br/></div>
<div>Now you can do things like adding titles, legends, gridlines and so on using the syntax described here: <a href="http://dbentrance.com/newdocs/plotsyntax.html">http://dbentrance.com/newdocs/plotsyntax.html</a>. There are also examples in the Entrance blog.</div>
<div><br/></div>
<div>Ask questions here and I will answer. Happy charting!</div>Entrance at MySQL User Conference 2010tag:everythingmysql.ning.com,2010-04-08:3993569:BlogPost:16062010-04-08T18:29:56.000ZTod Landishttp://everythingmysql.ning.com/profile/TodLandis
<div><br></br></div>
<div>We will be demonstrating Entrance Community version in booth 525 at the MySQ User Conference in Santa Clara. Stop by the booth and be sure to mention 'everythingmysql'.<div><br></br></div>
<div>Entrance is a desktop application for drawing charts using data in MySQL databases. If you know a little SQL, browse the documentation page for our PLOT command:…</div>
</div>
<div><br/></div>
<div>We will be demonstrating Entrance Community version in booth 525 at the MySQ User Conference in Santa Clara. Stop by the booth and be sure to mention 'everythingmysql'.<div><br/></div>
<div>Entrance is a desktop application for drawing charts using data in MySQL databases. If you know a little SQL, browse the documentation page for our PLOT command: <a href="http://dbentrance.com/newdocs/en/plotscript.html">http://dbentrance.com/newdocs/en/plotsyntax.html</a>.</div>
<div>and I think you will get the idea: Any MySQL SELECT command becomes a chart when you add Entrance PLOT.</div>
<div><br/></div>
<div>Community version is GPLed. We can get help you get set up to both run and build it if you bring a laptop to the booth. (We can also show you the "Animated Shower Curtain" demo made almost famous by the LA MySQL Meetup)</div>
<div><br/></div>
<div>Tod Landis</div>
<div><a href="http://dbentrance.com/">http://www.dbentrance.com/</a></div>
</div>Chris is speaking at the MySQL 2010 Conferencetag:everythingmysql.ning.com,2010-03-08:3993569:BlogPost:13992010-03-08T21:21:28.000ZChrishttp://everythingmysql.ning.com/profile/Chris
I'll be presenting two talks this year:<br></br><br></br><a href="http://en.oreilly.com/mysql2010/public/schedule/detail/13396">Faster Than Alter - Less Downtime</a><br></br><br></br>"This will be a informative talk about real world problem solving and the powerful yet sometimes overlooked <span class="caps">LOAD DATA INFILE</span>
command. This talk is for MySQL DBAs who want to expand their<br />
knowledge, improve performance and decrease customer facing downtime"…<br></br>
I'll be presenting two talks this year:<br/><br/><a href="http://en.oreilly.com/mysql2010/public/schedule/detail/13396">Faster Than Alter - Less Downtime</a><br/><br/>"This will be a informative talk about real world problem solving and the powerful yet sometimes overlooked <span class="caps">LOAD DATA INFILE</span>
command. This talk is for MySQL DBAs who want to expand their<br />
knowledge, improve performance and decrease customer facing downtime"<br/><span style="font-weight: bold;"><br/></span><a href="http://en.oreilly.com/mysql2010/public/schedule/detail/13319">Get Your Replication On: Advanced Techniques, Tips and Tricks</a><br/><br/>Co-speaking with Sarah Sproehnle for this one! We have lots of
interesting uses for replication and some best practices up our<br />
sleeves. Warning: we won't be covering how to set up basic replication<br />
- that's a prerequisite for this talk!<br/><br/>Hope to see you there!<br/>Sarah speaking at the 2010 MySQL User Conferencetag:everythingmysql.ning.com,2010-02-22:3993569:BlogPost:13702010-02-22T23:27:05.000ZSarah Sproehnlehttp://everythingmysql.ning.com/profile/SarahSproehnle
I'll be giving 2 talks this year. Here's a quick description:<br></br><br></br>
<br />
<a href="http://en.oreilly.com/mysql2010/public/schedule/detail/12449">Want Faster Queries?</a><br></br>
Fixing slow queries is often very easy if you know what to look for and it can give huge performance gains. In this talk I'll cover common SQL mistakes, how to identify "bad" queries, indexing techniques, using EXPLAIN to verify execution plan, etc.<br />
<br />
…<br></br>
I'll be giving 2 talks this year. Here's a quick description:<br/><br/>
<br />
<a href="http://en.oreilly.com/mysql2010/public/schedule/detail/12449">Want Faster Queries?</a><br/>
Fixing slow queries is often very easy if you know what to look for and it can give huge performance gains. In this talk I'll cover common SQL mistakes, how to identify "bad" queries, indexing techniques, using EXPLAIN to verify execution plan, etc.<br />
<br />
<br/>
<a href="http://en.oreilly.com/mysql2010/public/schedule/detail/13319">Get your Replication on: Advanced Techniques, Tips and Tricks</a><br/>
I'll be co-speaking with Chris Schneider for this one! We have lots of interesting uses for replication and some best practices up our sleeves. Warning: we won't be covering how to set up basic replication - that's a prerequisite for this talk.<br />
<br/>Grant check for query analyzertag:everythingmysql.ning.com,2010-02-15:3993569:BlogPost:13462010-02-15T19:44:30.000ZChrishttp://everythingmysql.ning.com/profile/Chris
While working with the MySQL Enterprise Dashboard I found a small problem when trying to use the Query Analyzer. The test server I am running on had a user used by the dev team that had the following privileges:<br></br><br></br>GRANT USAGE ON *.* TO 'test_user'@'10.18.%' IDENTIFIED BY PASSWORD 'HASHNOTGIVEN'; <br></br>GRANT SELECT, INSERT, UPDATE, DELETE, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, SHOW VIEW, TRIGGER ON `canoe`.* TO 'test_user'@'10.18.%';<br></br>GRANT SELECT on `mysql`.`proc` TO…
While working with the MySQL Enterprise Dashboard I found a small problem when trying to use the Query Analyzer. The test server I am running on had a user used by the dev team that had the following privileges:<br/><br/>GRANT USAGE ON *.* TO 'test_user'@'10.18.%' IDENTIFIED BY PASSWORD 'HASHNOTGIVEN'; <br/>GRANT SELECT, INSERT, UPDATE, DELETE, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, SHOW VIEW, TRIGGER ON `canoe`.* TO 'test_user'@'10.18.%';<br/>GRANT SELECT on `mysql`.`proc` TO 'test_user'@'10.18.%';<br/><br/>I the agent running on this server is mysqlmonitoragent-2.1.0.1093 and the proxy has been set to receive connections on the default port, 6446. When I try to connect I received the following error:<br/><br/>shell> mysql -utest_user -p --host=m120649.ningops.com --port=6446 <br/>Enter password: <br/>ERROR 1045 (28000): Access denied for user 'test_user'@'localhost' (using password: YES)<br/><br/>I was able to use the test_user user to login on port 3306:<br/><br/>shell> mysql -utest_user -p --host=m120649.ningops.com --port=3306<br/>Enter password: <br/>Welcome to the MySQL monitor. Commands end with ; or \\\\g.<br/>Your MySQL connection id is 2017<br/>Server version: 5.5.1-m2-log MySQL Community Server (GPL)<br/><br/>Type 'help;' or '\\\\h' for help. Type '\\\\c' to clear the current input statement.<br/><br/>mysql> \\\\q<br/>Bye<br/><br/>Needless to say I was surprised to see localhost in the error message given that I was connecting through TCP/IP port 6446. After I placed the localhost grants on the master server<br/><br/>-- logged in through 3306<br/>root@nmem.xnb3@m1203c0:/local/home/eng#mysql -utest_user -p --host=m120649.ningops.com --port=3306<br/>Enter password: <br/>Welcome to the MySQL monitor. Commands end with ; or \\\\g.<br/>Your MySQL connection id is 2017<br/>Server version: 5.5.1-m2-log MySQL Community Server (GPL)<br/><br/>Type 'help;' or '\\\\h' for help. Type '\\\\c' to clear the current input statement.<br/><br/>mysql> \\\\q<br/>Bye<br/><br/>On the master server I had to add localhost privileges to the test_user user.<br/><br/>mysql> show grants for 'test_user'@'localhost'; <br/>+------------------------------------------------------------------------------------------------------------------------------------------------+<br/>| Grants for test_user@localhost |<br/>+------------------------------------------------------------------------------------------------------------------------------------------------+<br/>| GRANT USAGE ON *.* TO 'test_user'@'localhost' IDENTIFIED BY PASSWORD 'HASHNOTGIVEN' |<br/>| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, SHOW VIEW, TRIGGER ON `canoe`.* TO 'test_user'@'localhost' |<br/>| GRANT SELECT ON `mysql`.`proc` TO 'test_user'@'localhost' |<br/>+------------------------------------------------------------------------------------------------------------------------------------------------+<br/>3 rows in set (0.00 sec)<br/><br/>A couple things to remember when using the Query Analyzer:<br/><br/>1. Don't use it in production unless you have to<br/>2. Make sure the user(s) have the same localhost privileges as they do for none localhost entries<br/><br/>MySQL Meetup Group - Back in the Bay!tag:everythingmysql.ning.com,2010-02-07:3993569:BlogPost:13082010-02-07T06:52:28.000ZChrishttp://everythingmysql.ning.com/profile/Chris
The recently revived MySQL Meetup group had its first meeting. A big thanks to Venu Anuganti, our host and <a href="http://www.schoonerinfotech.com">Schooner</a> our sponsor. If anyone is interested in joining the fun please check out the Meetup.com site <a href="http://www.meetup.com/bay-mysql/">here</a>. <br></br><br></br>During our first meetup we went over basic MySQL topics including configuration, performance tuning, locking, along with running MySQL in the cloud. All in all it was a well done…
The recently revived MySQL Meetup group had its first meeting. A big thanks to Venu Anuganti, our host and <a href="http://www.schoonerinfotech.com">Schooner</a> our sponsor. If anyone is interested in joining the fun please check out the Meetup.com site <a href="http://www.meetup.com/bay-mysql/">here</a>. <br/><br/>During our first meetup we went over basic MySQL topics including configuration, performance tuning, locking, along with running MySQL in the cloud. All in all it was a well done presentation and I am looking forward to the next.<br/><br/>Thanks again for getting the Meetup going!<br/><br/>Chris <br/>ORACLE won't kill MySQL!tag:everythingmysql.ning.com,2010-01-15:3993569:BlogPost:11792010-01-15T23:56:26.000ZChrishttp://everythingmysql.ning.com/profile/Chris
Lets just get it over with!<br />
<br />
"MySQL co-founder David Axmark says "Oracle has no real reason to support" the open-source database it's trying to acquire as part of Sun, but he also says "I doubt they'd 'kill' anything." Rather, the real intrigue will center on what happens when Oracle's database customers want to migrate downstream to MySQL.<br />
<br />
From a cbronline.com article quoting Axmark:"<br />
<br />
-- FULL Article…
Lets just get it over with!<br />
<br />
"MySQL co-founder David Axmark says "Oracle has no real reason to support" the open-source database it's trying to acquire as part of Sun, but he also says "I doubt they'd 'kill' anything." Rather, the real intrigue will center on what happens when Oracle's database customers want to migrate downstream to MySQL.<br />
<br />
From a cbronline.com article quoting Axmark:"<br />
<br />
-- FULL Article<br />
<a href="http://www.informationweek.com/blog/main/archives/2010/01/oracle_wont_kil.html;jsessionid=R2UWL0QMOQMSHQE1GHPSKHWATMY32JVN">http://www.informationweek.com/blog/main/archives/2010/01/oracle_wont_kil.html;jsessionid=R2UWL0QMOQMSHQE1GHPSKHWATMY32JVN</a>MySQL UC 2010?tag:everythingmysql.ning.com,2009-11-24:3993569:BlogPost:9102009-11-24T22:36:48.000ZChrishttp://everythingmysql.ning.com/profile/Chris
Soooooooo, is the MySQL conference going to fizzle out in 2010? If you have been busy waiting to see what will happen with Oracle/Sun/MySQL then you probably didn’t notice that the call for papers did not go out to the community for 2010 UC. I don’t know about you but the MySQL Conference is something I look forward to every year and enjoy attending. Just being there is great for networking and keeping up on innovation not to mention getting out of the office for the better part of a week!<br />
<br />
I…
Soooooooo, is the MySQL conference going to fizzle out in 2010? If you have been busy waiting to see what will happen with Oracle/Sun/MySQL then you probably didn’t notice that the call for papers did not go out to the community for 2010 UC. I don’t know about you but the MySQL Conference is something I look forward to every year and enjoy attending. Just being there is great for networking and keeping up on innovation not to mention getting out of the office for the better part of a week!<br />
<br />
I was planning on submitting a few talks of my own this year but am wondering if the UC in 2010 will even happen. Sure there are some dates around it, April 12-15, found on <a href="http://www.mysqlconf.com/" target="_blank">http://www.mysqlconf.com/</a> but no other information.<br />
<br />
I know that the <a href="http://www.mysqlperformanceblog.com/2009/10/23/percona-performance-conference-2010/" target="_blank">Percona conference</a> is scheduled for April 12-13 this year. I really like the Percona conference given that it provides more choices for everyone involved with MySQL. Some people might think that having both at the same time might take away from the traditional MySQL UC; however, in the end, we are all a part of the same MySQL community and can benefit from both!<br />
<br />
If the MySQL UC in 2010 does not happen for some reason I will be totally bummed out but maybe I can still do a “lightning talk” again at the Percona conference.<br />
<br />
If you know when the MySQL community can send in papers for the 2010 UC let use know!Broken Index from InnoDB Hot Backuptag:everythingmysql.ning.com,2009-11-09:3993569:BlogPost:8362009-11-09T20:44:58.000ZChrishttp://everythingmysql.ning.com/profile/Chris
A very interesting problem came up a while back when testing a rebuild and failover procedure. I had just run a rebuild of a slave server with InnoDB Hot Backup from the master. After the failover, one query on three tables in three different databases was not performing as it should. This was very odd to me given that the same table in all three databases was acting up. Below is the table structure and example query:<br />
<br />
<b>mysql></b> show create table…
A very interesting problem came up a while back when testing a rebuild and failover procedure. I had just run a rebuild of a slave server with InnoDB Hot Backup from the master. After the failover, one query on three tables in three different databases was not performing as it should. This was very odd to me given that the same table in all three databases was acting up. Below is the table structure and example query:<br />
<br />
<b>mysql></b> show create table plx_async_job\\\\G<br />
*************************** 1. row ***************************<br />
Table: plx_async_job<br />
Create Table: CREATE TABLE `plx_async_job` (<br />
`async_job_id` int(11) NOT NULL AUTO_INCREMENT,<br />
`db_id` tinyint(3) unsigned NOT NULL DEFAULT '0',<br />
`user_id` int(11) NOT NULL DEFAULT '0',<br />
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',<br />
`modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',<br />
`job_status` tinyint(4) NOT NULL DEFAULT '0',<br />
`job_type` smallint(6) NOT NULL DEFAULT '0',<br />
`run_at` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',<br />
`obj_id` int(11) NOT NULL DEFAULT '0',<br />
`job_data` blob NOT NULL,<br />
PRIMARY KEY (`async_job_id`),<br />
KEY `job_status` (`job_status`,`job_type`,`run_at`),<br />
KEY `user_id` (`user_id`,`job_status`,`job_type`,`obj_id`)<br />
) ENGINE=InnoDB<br />
<br />
<b>mysql></b> explain SELECT plx_async_job.async_job_id, plx_async_job.db_id, plx_async_job.user_id, plx_async_job.created, plx_async_job.modified, plx_async_job.job_status, plx_async_job.job_type, plx_async_job.run_at, plx_async_job.obj_id, plx_async_job.job_data FROM plx_async_job where job_status = 0 and job_type = 18 and run_at <= '2009-10-26 22:19:21' LIMIT 1000;<br />
+----+-------------+---------------+-------+---------------+------------+---------+------+--------+-------------+<br />
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |<br />
+----+-------------+---------------+-------+---------------+------------+---------+------+--------+-------------+<br />
| 1 | SIMPLE | plx_async_job | range | job_status | job_status | 11 | NULL | 333072 | Using where |<br />
+----+-------------+---------------+-------+---------------+------------+---------+------+--------+-------------+<br />
1 row in set (0.00 sec)<br />
<br />
Keep in mind that there is an average 188K rows in the table on all three databases. I was a bit puzzled when I saw the explain output running an index search on almost double the rows. I have to say that I have never seen this behavior before and initially equated this to a bug in MySQL 5.4.0.<br />
<br />
I started trouble shooting this issue by running the same query on all three databases on the old master and the new master. Both the explain output and the query execution time did not match up to what I was seeing on the new master. Here are the examples:<br />
<br />
<u>On the new master (the server that was rebuilt from InnoDB Hot Backup)</u><br />
<br />
<b>mysql></b> explain SELECT plx_async_job.async_job_id, plx_async_job.db_id, plx_async_job.user_id, plx_async_job.created, plx_async_job.modified, plx_async_job.job_status, plx_async_job.job_type, plx_async_job.run_at, plx_async_job.obj_id, plx_async_job.job_data FROM plx_async_job where job_status = 0 and job_type = 18 and run_at <= '2009-10-26 22:19:21' LIMIT 1000;<br />
+----+-------------+---------------+-------+---------------+------------+---------+------+--------+-------------+<br />
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |<br />
+----+-------------+---------------+-------+---------------+------------+---------+------+--------+-------------+<br />
| 1 | SIMPLE | plx_async_job | range | job_status | job_status | 11 | NULL | <b>333072</b> | Using where |<br />
+----+-------------+---------------+-------+---------------+------------+---------+------+--------+-------------+<br />
1 row in set (0.00 sec)<br />
<br />
<b>mysql></b> SELECT plx_async_job.async_job_id, plx_async_job.db_id, plx_async_job.user_id, plx_async_job.created, plx_async_job.modified, plx_async_job.job_status, plx_async_job.job_type, plx_async_job.run_at, plx_async_job.obj_id, plx_async_job.job_data FROM plx_async_job where job_status = 0 and job_type = 18 and run_at <= '2009-10-26 22:19:21' LIMIT 1000;<br />
<b>Empty set (4.57 sec)</b><br />
<br />
<u>On the old master (Where the backup was taken from)</u><br />
<br />
<b>mysql></b> explain SELECT plx_async_job.async_job_id, plx_async_job.db_id, plx_async_job.user_id, plx_async_job.created, plx_async_job.modified, plx_async_job.job_status, plx_async_job.job_type, plx_async_job.run_at, plx_async_job.obj_id, plx_async_job.job_data FROM plx_async_job where job_status = 0 and job_type = 18 and run_at <= '2009-10-26 22:19:21' LIMIT 1000;<br />
+----+-------------+---------------+-------+---------------+------------+---------+------+------+-------------+<br />
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |<br />
+----+-------------+---------------+-------+---------------+------------+---------+------+------+-------------+<br />
| 1 | SIMPLE | plx_async_job | range | job_status | job_status | 11 | NULL | <b>1</b> | Using where |<br />
+----+-------------+---------------+-------+---------------+------------+---------+------+------+-------------+<br />
<br />
<b>mysql></b> SELECT plx_async_job.async_job_id, plx_async_job.db_id, plx_async_job.user_id, plx_async_job.created, plx_async_job.modified, plx_async_job.job_status, plx_async_job.job_type, plx_async_job.run_at, plx_async_job.obj_id, plx_async_job.job_data FROM plx_async_job where job_status = 0 and job_type = 18 and run_at <= '2009-10-26 22:19:21' LIMIT 1000;<br />
<b>Empty set (0.00 sec)</b><br />
<br />
The information above pointed to InnoDB fragmentation; however, normal InnoDB fragmentation occurs over time based on usage, not from an InnoDB Hot Backup. I tested the fragmented theory by trying to defragment the table. There are three ways to do this. 1. mysqldump with –order-by-primary then import 2. Dump and reload the table with SELECT INTO OUTFILE and LOAD DATA INFILE 3. alter table table_name ENGINE=INNODB;<br />
<br />
I chose option 2 cause I could not afford the time to fail back and did not want the table to lock for the duration of the table rebuild with option 3.<br />
<br />
<b>mysql></b> alter table plx_async_job rename to plx_async_job_save;<br />
<br />
<b>mysql></b> CREATE TABLE `plx_async_job` (<br />
`async_job_id` int(11) NOT NULL AUTO_INCREMENT,<br />
`db_id` tinyint(3) unsigned NOT NULL DEFAULT '0',<br />
`user_id` int(11) NOT NULL DEFAULT '0',<br />
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',<br />
`modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',<br />
`job_status` tinyint(4) NOT NULL DEFAULT '0',<br />
`job_type` smallint(6) NOT NULL DEFAULT '0',<br />
`run_at` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',<br />
`obj_id` int(11) NOT NULL DEFAULT '0',<br />
`job_data` blob NOT NULL,<br />
PRIMARY KEY (`async_job_id`),<br />
KEY `job_status` (`job_status`,`job_type`,`run_at`),<br />
KEY `user_id` (`user_id`,`job_status`,`job_type`,`obj_id`)<br />
) ENGINE=InnoDB DEFAULT CHARSET=latin1;<br />
<br />
<b>mysql></b> select async_job_id,db_id,user_id,created,modified,job_status,job_type,run_at,obj_id,job_data INTO OUTFILE '/var/tmp/user3.plx_async_job_save.txt'<br />
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'<br />
LINES TERMINATED BY '\\\\n'<br />
FROM plx_async_job_save;<br />
<br />
<b>mysql></b> LOAD DATA INFILE '/var/tmp/user3.plx_async_job_save.txt' IGNORE INTO TABLE plx_async_job<br />
FIELDS TERMINATED BY ',' ENCLOSED BY '"'<br />
LINES TERMINATED BY '\\\\n';<br />
<br />
The process took less that 1 minute to complete on each table. Both the explain output and execution time took were now showing the following:<br />
<br />
<b>mysql></b> explain SELECT plx_async_job.async_job_id, plx_async_job.db_id, plx_async_job.user_id, plx_async_job.created, plx_async_job.modified, plx_async_job.job_status, plx_async_job.job_type, plx_async_job.run_at, plx_async_job.obj_id, plx_async_job.job_data FROM plx_async_job where job_status = 0 and job_type = 18 and run_at <= '2009-10-26 22:19:21' LIMIT 1000;<br />
+----+-------------+---------------+-------+---------------+------------+---------+------+------+-------------+<br />
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |<br />
+----+-------------+---------------+-------+---------------+------------+---------+------+------+-------------+<br />
| 1 | SIMPLE | plx_async_job | range | job_status | job_status | 11 | NULL | <b>1</b> | Using where |<br />
+----+-------------+---------------+-------+---------------+------------+---------+------+------+-------------+<br />
<br />
<b>mysql></b> SELECT plx_async_job.async_job_id, plx_async_job.db_id, plx_async_job.user_id, plx_async_job.created, plx_async_job.modified, plx_async_job.job_status, plx_async_job.job_type, plx_async_job.run_at, plx_async_job.obj_id, plx_async_job.job_data FROM plx_async_job where job_status = 0 and job_type = 18 and run_at <= '2009-10-26 22:19:21' LIMIT 1000;<br />
<b>Empty set (0.00 sec)</b><br />
<br />
<b>Conclusions:</b><br />
It’s very easy to trust what you have always used, tools like InnoDB Hot Backup, mysqldump and maybe even XtraBackup… That said, these tools in the right situation can cause annoying headaches so just remember to take a step back and remember the basics. In this case it was standard InnoDB fragmentation that was overlooked initially.Data type confusion: what is an int(11)?tag:everythingmysql.ning.com,2009-10-31:3993569:BlogPost:8012009-10-31T03:04:37.000ZSarah Sproehnlehttp://everythingmysql.ning.com/profile/SarahSproehnle
Over and over I see customers that don't understand what <code>int(11)</code> really means. Their confusion is understandable. Many know what defining a <code>char(10)</code> means (a fixed-sized character string that allows up to 10 characters). However, ints are different.<br />
<br />
First of all, there are 5 types of integer. They are all fixed size.<br />
<table>
<tr><td><b>Type</b></td>
<td><b># of…</b></td>
</tr>
</table>
Over and over I see customers that don't understand what <code>int(11)</code> really means. Their confusion is understandable. Many know what defining a <code>char(10)</code> means (a fixed-sized character string that allows up to 10 characters). However, ints are different.<br />
<br />
First of all, there are 5 types of integer. They are all fixed size.<br />
<table>
<tr><td><b>Type</b></td>
<td><b># of bytes</b></td>
</tr>
<tr><td>tinyint</td>
<td>1</td>
</tr>
<tr><td>smallint</td>
<td>2</td>
</tr>
<tr><td>mediumint</td>
<td>3</td>
</tr>
<tr><td>int</td>
<td>4</td>
</tr>
<tr><td>bigint</td>
<td>8</td>
</tr>
</table>
<br />
As you can see from the chart, an <code>int</code> is <i>always</i> 4 bytes. That can store signed numbers from -2 billion to +2 billion (and unsigned numbers 0 to 4B). So, what does it mean if you declare an <code>int(5)</code>? It does not restrict the number of digits to 5... It may actually do nothing! The (5) part is a display width. It's only used if you use UNSIGNED and ZEROFILL with an integer type. Then the display of those numbers will be zero-padded on the left to 5 digits if they contain less than 5 digits. Example:<br />
<br />
<code><br />
CREATE TABLE `foo` (<br />
`bar` int(5) unsigned zerofill DEFAULT NULL<br />
)<br />
</code><br />
<pre> SELECT * FROM foo;
+---------+<br />
| bar |<br />
+---------+<br />
| 00042 | <br />
| 00101 | <br />
| 9876543 | <br />
+---------+<br />
</pre>Secure Your Server – Tips for DBAstag:everythingmysql.ning.com,2009-10-22:3993569:BlogPost:7012009-10-22T21:30:00.000ZChrishttp://everythingmysql.ning.com/profile/Chris
I have complied a list of a good tips for DBAs to consider when implementing security policies in MySQL.<br />
<br />
<b>-- The List</b><br />
1. Make sure that <b>ALL</b> root accounts (ALL PRIVILEGED accounts) have strong passwords and apply them using hashes not plain text. If you leave the password blank anyone can connect as root without a password and be granted all privileges.<br />
<br />
2. For <b>ALL</b> other accounts use passwords and apply them using hashes not plain text.<br />
A good practice is to use the…
I have complied a list of a good tips for DBAs to consider when implementing security policies in MySQL.<br />
<br />
<b>-- The List</b><br />
1. Make sure that <b>ALL</b> root accounts (ALL PRIVILEGED accounts) have strong passwords and apply them using hashes not plain text. If you leave the password blank anyone can connect as root without a password and be granted all privileges.<br />
<br />
2. For <b>ALL</b> other accounts use passwords and apply them using hashes not plain text.<br />
A good practice is to use the following:<br />
<br />
<b>mysql></b> grant SELECT, INSERT……. ON `database`.* to ‘user’@’10.%’ IDENTIFIED BY ‘*9B9C8E678DB2D62877E829D633535CBEB2B7E6E0’;<br />
<br />
<i>NOTE: make sure you are using HASHS and not plain text!</i><br />
If you run something like below…<br />
<br />
<b>mysql></b> update user set password = password(‘somepassword’) where user = ‘someuser’;<br />
Make sure you remove it from the ~/.mysql_history file in your home dir and or roots home directory. Otherwise, if your server becomes compromised, the intruder can take full advantage of this file and do more damage.<br />
<br />
3. Give specific permissions on an as needed basis and use different logins for different purposes.<br />
<br />
<i>NOTE: You don't have to give column level permissions because they hurt performance so try and stick to table, at the lowest, and database level permissions.</i><br />
<br />
4. Avoid using FQDN or hostnames when granting access. Try to keep it to a subnet (Example: 10.1.2.%).<br />
<br />
5. Avoid having the MySQL server open to connections from everywhere by using ‘%’ for any user. Although remote exploits are few and far between, it is just better not to risk it.<br />
<br />
6. Remove <b>ALL</b> blank user accounts. Even if they just have USAGE!<br />
<br />
<b>mysql></b> DELETE from user WHERE user = ‘’;<br />
<br />
7. Remove the following from the mysql.db table<br />
<br />
<b>mysql></b> DELETE from mysql.db WHERE Db = ‘test’ OR Db = ‘test\\\\_%’;<br />
<br />
You might ask why for the above removal, well, here is an explanation…<br />
<br />
Let’s say you have many different databases on a single MySQL instance where the users control the names of their databases. The traditional rules apply like database name have to be unique, but some of these users have the same idea; adding a test database to their MySQL instance. Given that test is already taken on the server one user would create a database named test_a and another would create test_b. With the grant in the mysql.db table, Db = ‘test\\\\_%’, BOTH users would have read and write access to each others database. If the overall goal is keep users from seeing each others databases than the Db = ‘test\\\\_%’ grant must be removed.<br />
<br />
A long explanation but I have seen it happen!Security Sensitive Grantstag:everythingmysql.ning.com,2009-10-22:3993569:BlogPost:6072009-10-22T01:00:00.000ZChrishttp://everythingmysql.ning.com/profile/Chris
Consider excluding the following grants from users on any production MySQL server.<br />
<br />
-- GRANT OPTION<br />
"The GRANT OPTION privilege enables you to give to other users or remove from other users those privileges that you yourself possess." (<a href="http://dev.mysql.com/doc/refman/5.1/en/privileges-provided.html#priv_grant-option">http://dev.mysql.com/doc/refman/5.1/en/privileges-provided.html#priv_grant-option</a>)<br />
<br />
-- RELOAD<br />
"The RELOAD privilege enables use of the FLUSH statement. It also enables…
Consider excluding the following grants from users on any production MySQL server.<br />
<br />
-- GRANT OPTION<br />
"The GRANT OPTION privilege enables you to give to other users or remove from other users those privileges that you yourself possess." (<a href="http://dev.mysql.com/doc/refman/5.1/en/privileges-provided.html#priv_grant-option">http://dev.mysql.com/doc/refman/5.1/en/privileges-provided.html#priv_grant-option</a>)<br />
<br />
-- RELOAD<br />
"The RELOAD privilege enables use of the FLUSH statement. It also enables mysqladmin commands that are equivalent to FLUSH operations: flush-hosts, flush-logs, flush-privileges, flush-status, flush-tables, flush-threads, refresh, and reload." (<a href="http://dev.mysql.com/doc/refman/5.1/en/privileges-provided.html#priv_reload">http://dev.mysql.com/doc/refman/5.1/en/privileges-provided.html#priv_reload</a>)<br />
<br />
-- SUPER<br />
"The SUPER privilege enables an account to use CHANGE MASTER TO, KILL or mysqladmin kill to kill threads belonging to other accounts (you can always kill your own threads), PURGE BINARY LOGS, configuration changes via SET GLOBAL to modify global system variables, the mysqladmin debug command, enabling or disabling logging, performing updates even if the read_only system variable is enabled, starting and stopping replication on slave servers, and allows you to connect (once) even if the connection limit controlled by the max_connections system variable is reached. " (<a href="http://dev.mysql.com/doc/refman/5.1/en/privileges-provided.html#priv_super">http://dev.mysql.com/doc/refman/5.1/en/privileges-provided.html#priv_super</a>)<br />
<br />
-- SHUTDOWN<br />
Need I say more?!<br />
<br />
-- FILE<br />
"The FILE privilege gives you permission to read and write files on the server host using the LOAD DATA INFILE and SELECT ... INTO OUTFILE statements and the LOAD_FILE() function. A user who has the FILE privilege can read any file on the server host that is either world-readable or readable by the MySQL server. (This implies the user can read any file in any database directory, because the server can access any of those files.) The FILE privilege also enables the user to create new files in any directory where the MySQL server has write access. As a security measure, the server will not overwrite existing files." (<a href="http://dev.mysql.com/doc/refman/5.1/en/privileges-provided.html#priv_file">http://dev.mysql.com/doc/refman/5.1/en/privileges-provided.html#priv_file</a>)<br />
<br />
-- ALTER (This is more of a performance saver than security)<br />
"The ALTER privilege may be used to subvert the privilege system by renaming tables. " (<a href="http://dev.mysql.com/doc/refman/5.1/en/privileges-provided.html#priv_alter">http://dev.mysql.com/doc/refman/5.1/en/privileges-provided.html#priv_alter</a>)<br />
<br />
Alter is used to change schema and can pose a very large problem if someone does not know what they are doing. Only root and administrative accounts should have this permission in production. I guess it makes me feel more secure that the admin account is only one with ALTER!<br />
<br />
For more details please check out the manual online <a href="http://dev.mysql.com/doc/refman/5.1/en/grant.html" target="_blank">here</a>.<br />
<br />
<b>Best Practices</b><br />
1. Make sure you have a read-only user and a write user<br />
-- Read-only grants = SELECT, CREATE TEMPORARY TABLES<br />
-- Write user grants = SELECT, INSERT, UPDATE, DELTE, CREATE TEMPORARY TABLES<br />
2. Make sure you have at least one local root account with ALL privileges and GRANT OPTION<br />
3. Optional, but I like to have it<br />
-- You may want elevated privileges from a particular subnet… This is fine just don’t let the host be ‘%’<br />
4. Replication user, backup user, and possibly a user to run scriptsBasics of MySQL failover (using replication)tag:everythingmysql.ning.com,2009-10-21:3993569:BlogPost:5092009-10-21T15:50:52.000ZSarah Sproehnlehttp://everythingmysql.ning.com/profile/SarahSproehnle
<p>For easy MySQL failover, replication is a great solution. This post will cover the basics of performing a failover in case your master dies.</p>
<p>First, setup one-way replication (or two-way, but don't plan to use both servers for writes at the same time). Next, you'll want to direct all activity, or at least the writes, to the master. If the master dies, there are two major concerns:</p>
<ol>
<li><b>Redirecting the clients to the slave.</b> There are several ways to handle this, such as…</li>
</ol>
<p>For easy MySQL failover, replication is a great solution. This post will cover the basics of performing a failover in case your master dies.</p>
<p>First, setup one-way replication (or two-way, but don't plan to use both servers for writes at the same time). Next, you'll want to direct all activity, or at least the writes, to the master. If the master dies, there are two major concerns:</p>
<ol>
<li><b>Redirecting the clients to the slave.</b> There are several ways to handle this, such as <a href="http://www.linux-ha.org/Heartbeat" target="_blank">Heartbeat</a> or MySQL's JDBC driver.</li>
<li><b>Checking if the slave is caught up.</b> This is trickier. If the master's binary logs are still available, then you can do SHOW SLAVE STATUS on the slave and compare the READ_MASTER_LOG_POS to the master's binary log. For example, if SHOW SLAVE STATUS shows: <br/><code>Master_Log_File: localhost-bin.000051<br/> Read_Master_Log_Pos: 605
</code><br />
Then look at the master's binary log files. A long listing will do the trick:<br />
<code><br />
ls -l *bin*<br />
-rw-rw---- 1 mysql mysql 698 2009-10-08 18:24 localhost-bin.000051<br />
</code><br />
<br />
<p>Note that the binary log has a size of 698 bytes. Yet the slave only read up to byte position 605. So you can manually execute the activity that the slave missed: <br/><code>
mysqlbinlog --start-position=605 localhost-bin.000051 | mysql -h slave-host-name<br />
</code><br />
</p>
</li>
</ol>
<p>You may want to manually get the slave up-to-date before failing over. Or you can keep the slave read-only until you catch the slave up, then turn off read-only by doing SET GLOBAL read_only=0;</p>
<p>You may want to setup replication in both directions (sometimes called "master-master" or two-way replication). This is a tricky setup if both servers are actively doing updates. But if you know that only one of the servers is updating at any one time, then it works quite well. Once you've failed-over to the slave, it is now acting as a master. Any updates done on this server can be replicated back to the other server when it comes back up.
</p>
<p>This solution is not perfect and may not be suitable for all situations. There is potential data loss (possibly unknown data loss) if the binary logs are no longer available on the master. For some scenarios it is better to have additional means of failover such as MySQL Cluster or DRBD for localized failures.</p>No Password – No Problemtag:everythingmysql.ning.com,2009-10-21:3993569:BlogPost:5072009-10-21T01:49:58.000ZChrishttp://everythingmysql.ning.com/profile/Chris
In the past I have needed to gain access to MySQL servers when the password had been strangely forgotten. Below there are thee different processes to gain access to MySQL if you just don’t have the <i>right</i> kind of access you need or want.<br />
<br />
<b>Option 1: --skip-grant-tables</b><br />
<br />
This will allow you to login to the server and change what you need to in the mysql.user table. Of course you will need to restart the server again without --skip-grant-tables if you want the current and newly added…
In the past I have needed to gain access to MySQL servers when the password had been strangely forgotten. Below there are thee different processes to gain access to MySQL if you just don’t have the <i>right</i> kind of access you need or want.<br />
<br />
<b>Option 1: --skip-grant-tables</b><br />
<br />
This will allow you to login to the server and change what you need to in the mysql.user table. Of course you will need to restart the server again without --skip-grant-tables if you want the current and newly added or modified user account to work.<br />
<br />
This option is a good way to gain access to the server in the event that you have no elevated (root) privileges on the MySQL server. You do need root on the server you are on so you can kill the pid and restart with --skip-grant-tables.<br />
<br />
<b>Option 2: elevating your privileges</b><br />
<br />
You will need to have an account on the server with WRITE access to the mysql database.<br />
<br />
<b>mysql></b> show grants for ‘chris’@’localhost’;<br />
+----------------------------------------------------------+<br />
| Grants for chris@localhost |<br />
+----------------------------------------------------------+<br />
| GRANT USAGE ON *.* TO 'chris'@'localhost' |<br />
| GRANT SELECT, INSERT ON `mysql`.* TO 'chris'@'localhost' |<br />
+----------------------------------------------------------+<br />
2 rows in set (0.00 sec)<br />
<br />
<b>mysql></b> select * from user where user = 'chris'\\\\G<br />
*************************** 1. row ***************************<br />
Host: localhost<br />
User: chris<br />
Password:<br />
Select_priv: N<br />
Insert_priv: N<br />
Update_priv: N<br />
Delete_priv: N<br />
Create_priv: N<br />
Drop_priv: N<br />
Reload_priv: N<br />
Shutdown_priv: N<br />
Process_priv: N<br />
File_priv: N<br />
Grant_priv: N<br />
References_priv: N<br />
Index_priv: N<br />
Alter_priv: N<br />
Show_db_priv: N<br />
Super_priv: N<br />
Create_tmp_table_priv: N<br />
Lock_tables_priv: N<br />
Execute_priv: N<br />
Repl_slave_priv: N<br />
Repl_client_priv: N<br />
Create_view_priv: N<br />
Show_view_priv: N<br />
Create_routine_priv: N<br />
Alter_routine_priv: N<br />
Create_user_priv: N<br />
Event_priv: N<br />
Trigger_priv: N<br />
ssl_type:<br />
ssl_cipher:<br />
x509_issuer:<br />
x509_subject:<br />
max_questions: 0<br />
max_updates: 0<br />
max_connections: 0<br />
max_user_connections: 0<br />
1 row in set (0.00 sec)<br />
<br />
<b>mysql></b> insert into mysql.user VALUES ('%','sneekyuser','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);<br />
Query OK, 1 row affected (0.00 sec)<br />
<br />
<b>mysql></b> flush privileges;<br />
<i>ERROR 1227 (42000): Access denied; you need the RELOAD privilege for this operation</i><br />
<br />
Note the <i>ERROR</i> above.<br />
<br />
<b>mysql></b> select * from user where user = 'sneekyuser'\\\\G<br />
*************************** 1. row ***************************<br />
Host: %<br />
User: sneekyuser<br />
Password:<br />
Select_priv: Y<br />
Insert_priv: Y<br />
Update_priv: Y<br />
Delete_priv: Y<br />
Create_priv: Y<br />
Drop_priv: Y<br />
Reload_priv: Y<br />
Shutdown_priv: Y<br />
Process_priv: Y<br />
File_priv: Y<br />
Grant_priv: Y<br />
References_priv: Y<br />
Index_priv: Y<br />
Alter_priv: Y<br />
Show_db_priv: Y<br />
Super_priv: Y<br />
Create_tmp_table_priv: Y<br />
Lock_tables_priv: Y<br />
Execute_priv: Y<br />
Repl_slave_priv: Y<br />
Repl_client_priv: Y<br />
Create_view_priv: Y<br />
Show_view_priv: Y<br />
Create_routine_priv: Y<br />
Alter_routine_priv: Y<br />
Create_user_priv: Y<br />
Event_priv: Y<br />
Trigger_priv: Y<br />
ssl_type:<br />
ssl_cipher:<br />
x509_issuer:<br />
x509_subject:<br />
max_questions: 0<br />
max_updates: 0<br />
max_connections: 0<br />
max_user_connections: 0<br />
1 row in set (0.00 sec)<br />
<br />
The problem with this method is that you need a MySQL restart, a full server restart or a user with RELOAD to run “FLUSH PRIVILEGES”. Although these actions can occur on production systems you might have to wait a while if you’re not the one in control of these actions. For this example I restarted the MySQL server and obtained the grants I wanted.<br />
<br />
<b>shell></b> mysql -usneekyuser -S /tmp/mysql.sock<br />
<br />
<b>mysql></b> show grants;<br />
+-------------------------------------------------------------------+<br />
| Grants for sneekyuser@% |<br />
+-------------------------------------------------------------------+<br />
| GRANT ALL PRIVILEGES ON *.* TO 'sneekyuser'@'%' WITH GRANT OPTION |<br />
+-------------------------------------------------------------------+<br />
1 row in set (0.00 sec)<br />
<br />
<br />
<b>Option 3: MyISAM is GREAT</b><br />
<br />
All of the system tables that MySQL uses are in the MyISAM storage engine. That said and knowing that the privilege tables are loaded into memory at runtime you can just replace the user.frm, user.MYD and user.MYI file on the OS level and restart.<br />
<br />
Please keep in mind that these are “operational tasks” that could prove useful to your environment given the right situation. The processes listed above are <b>NOT</b> the gateway into hacking the MySQL server given that you need some sort of preexisting access to the server or MySQL.How MySQL Cluster executes queriestag:everythingmysql.ning.com,2009-10-19:3993569:BlogPost:5042009-10-19T10:44:30.000ZSarah Sproehnlehttp://everythingmysql.ning.com/profile/SarahSproehnle
This post describes how MySQL Cluster executes queries. First of all, Cluster is a storage engine. It doesn't actually execute queries because it doesn't speak SQL. That is why you use a MySQL server, which parses your queries and sends low-level storage engine API calls to the Cluster data nodes. The data nodes know how to retrieve or store data. Or you can talk to the data nodes directly using the NDB API(s).<br />
<br />
MySQL Cluster has various means of executing queries. They boil down…
This post describes how MySQL Cluster executes queries. First of all, Cluster is a storage engine. It doesn't actually execute queries because it doesn't speak SQL. That is why you use a MySQL server, which parses your queries and sends low-level storage engine API calls to the Cluster data nodes. The data nodes know how to retrieve or store data. Or you can talk to the data nodes directly using the NDB API(s).<br />
<br />
MySQL Cluster has various means of executing queries. They boil down to:<br />
<ol>
<li>Primary key lookup</li>
<li>Unique key lookup</li>
<li>Ordered index scan (i.e., non-unique indexes that use T-trees)</li>
<li>Full table scan</li>
</ol>
<br />
Let's say you have 4 data nodes in your cluster (NoOfReplicas=2). This means you have 2 node groups and each one has half the data. Cluster uses a hash on the primary key (unless you've controlled the partitioning using the 5.1 partitioning features). So for any table, half the rows are in one node group and half the rows are the in other node group.<br />
<br />
Now for the 4 types of query execution. You can verify which type of execution is used with EXPLAIN. Here's how each ones works:<br />
<ol>
<li>Primary key lookup - the MySQL server can calculate the hash on the primary key and know which data node the relevant row resides in. Then the MySQL server contacts that data node and receives the row.</li>
<li>Unique key lookup - the MySQL server cannot know which data node the row might be stored in. So it contacts a pseudo-random node. That data node has a hidden table that maps the unique key values to the primary key. Then the hash on the primary key reveals where the row resides.</li>
<li>Ordered index scans are sent in parallel to all data nodes, where they search their local t-tree.</li>
<li>Full table scans are send in parallel to all data nodes, where they scan their primary fragment.</li>
</ol>
<br />
Summary: primary key lookups are best. If you have more than 2 nodes, throughput goes up because all nodes are actively serving different fragments of data. Ordered index lookup and full table scans are done in parallel, so more nodes leads to better performance. I hope to post some benchmarks soon (just need to get my hands on the hardware..)A MySQL problem or something else?tag:everythingmysql.ning.com,2009-10-05:3993569:BlogPost:2412009-10-05T22:53:57.000ZChrishttp://everythingmysql.ning.com/profile/Chris
Sometimes problems manifest inside of MySQL but the MySQL server is really not the problem. A good example is how MySQL uses reverse DNS lookups for authentication.<br />
<br />
<b>The Problem</b><br />
<br />
You are alerted to a problem with a MySQL server either by Nagios or whatever… You log into the server and everything seems to be working correctly until you run “show full processlist”. The majority of your connections are in an “Unauthenticated” state and the rest are in some other state, probably “Sleeping”.…
Sometimes problems manifest inside of MySQL but the MySQL server is really not the problem. A good example is how MySQL uses reverse DNS lookups for authentication.<br />
<br />
<b>The Problem</b><br />
<br />
You are alerted to a problem with a MySQL server either by Nagios or whatever… You log into the server and everything seems to be working correctly until you run “show full processlist”. The majority of your connections are in an “Unauthenticated” state and the rest are in some other state, probably “Sleeping”. You speak with the lead developer and they state that there have not been any code changes for 1 month. It’s an odd problem, when you see it; however, the solution is not that obscure when you think about <a href="http://dev.mysql.com/doc/refman/5.0/en/dns.html" target="_blank">how MySQL uses DNS</a>.<br />
<br />
<b>The Solution</b><br />
<br />
When you restart MySQL with “skip-name-resolve” enabled you might think that all of your problems are gone based on the issue describe above. Well, just make sure that all of the hosts in the mysql.user table are IPs or IP ranges and not FQDN.<br />
<br />
Not only will enabling "skip-name-resolve” save time and money if DNS goes down, it is also good for performance. Here are some quick tests to illustrate the performance gains:<br />
<br />
<b>-- Performance Benefit</b><br />
<br />
<u>Without “skip-name-resolve” enabled</u><br />
<br />
shell> date; mysql -u root -h 192.168.0.1 ; date<br />
Mon Oct 5 15:20:40 PDT 2009<br />
ERROR 1130 (00000): Host '192.168.0.2' is not allowed to connect to this MySQL server<br />
Mon Oct 5 15:20:43 PDT 2009<br />
<br />
<i>Note the time change is 3 seconds</i><br />
<br />
<u>With “skip-name-resolve” enabled</u>:<br />
<br />
shell> date; mysql -u root -h 192.168.0.1 ; date<br />
Mon Oct 5 15:22:01 PDT 2009<br />
ERROR 1130 (00000): Host '192.168.0.2' is not allowed to connect to this MySQL server<br />
Mon Oct 5 15:22:01 PDT 2009<br />
<br />
<i>Note that the server comes back immediately with the same error</i><br />
<br />
<b>Best Practice</b><br />
I always make sure the “skip-name-resolve” is in any MySQL configuration file (my.cnf) in all of my installations.