tag:blogger.com,1999:blog-13627274497298007742024-03-13T21:11:49.911-07:00Matt Lord's BlogThoughts on MySQL and related topics.Anonymoushttp://www.blogger.com/profile/14733205485831945725noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-1362727449729800774.post-19943103612011468342014-11-17T09:39:00.003-08:002014-11-19T08:43:49.770-08:00A MySQL Enterprise Monitor Query Analyzer WalkthroughThe <a href="http://www.mysql.com/products/enterprise/query.html" target="_blank">Query Analyzer (QUAN)</a> is one of the flagship features of the <a href="http://www.mysql.com/products/enterprise/monitor.html" target="_blank">MySQL Enterprise Monitor (MEM)</a>. I wanted to take a few minutes to walkthrough a complete simulated example in order to demonstrate just how incredibly useful it is for becoming aware of problems, identifying the cause, and in finally fixing the issue.<br />
<br />
First, I created a simple MEM test environment:<br />
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
[root@mylab matt]# cat createsimpletestenv.sh </div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
#!/bin/sh</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px; min-height: 17px;">
<br /></div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo -n "Stopping any default mysqld instance..."</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
/etc/init.d/mysqld stop </div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo " done."</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px; min-height: 17px;">
<br /></div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo -n "Setting up fresh mysqld setup..."</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
cp -R /var/lib/mysqlfresh /var/lib/mysql</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
chown -R mysql:mysql /var/lib/mysql*</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo " done."</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px; min-height: 17px;">
<br /></div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo -n "Starting fresh default mysqld instance..."</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
/etc/init.d/mysqld start</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo " done."</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px; min-height: 17px;">
<br /></div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo </div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo "### Beggining MEM install: `date`"</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px; min-height: 17px;">
<br /></div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo -n "Installing monitor..."</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
/root/mysqlmonitor.bin --mode "unattended" --unattendedmodeui "minimal" \<br />
--installdir "/opt/mysql/enterprise/monitor" \</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
--adminuser "manager" --adminpassword "manager"</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo " done."</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px; min-height: 17px;">
<br /></div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo -n "Installing agent in 'phone home' mode..."</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
# Install Agent in "phone home" mode, to enable auto monitoring</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
/root/mysqlmonitoragent.bin --mode "unattended" --unattendedmodeui "minimal" \<br />
--mysqlhost "localhost" --mysqlport 3306 --managerhost "localhost" \<br />
--mysqluser "root" --mysqlpassword "root" --managerport 18443 \</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
--agentuser "agent" --agentpassword "agent" --generaluser "matt" \<br />
--generalpassword "matt" --limiteduser "sid" \</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
--limitedpassword "sid" --agent_autocreate 1 --mysqlconnectiongroup "Production"</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px; min-height: 17px;">
<br /></div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
/etc/init.d/mysql-monitor-agent start > /dev/null 2>&1</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo " done."</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px; min-height: 17px;">
<br /></div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo "### Ending MEM install: `date`"</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo</div>
<br />
Then I created some sample data in my new MySQL 5.6 instance using the <a href="http://dev.mysql.com/doc/sakila/en/" target="_blank">sakila</a> and <a href="https://dev.mysql.com/doc/employee/en/" target="_blank">employee</a> sample databases:<br />
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
[root@mylab matt]# cat loadtestdata.sh </div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
#!/bin/sh</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px; min-height: 17px;">
<br /></div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo -n "Loading the sakila database ... "</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
mysql < /opt/mysql/sakila-db/sakila-schema.sql</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
mysql < /opt/mysql/sakila-db/sakila-data.sql</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo "done."</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px; min-height: 17px;">
<br /></div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo -n "Loading the employees database ... "</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
cd /opt/mysql/employees_db</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
mysql < employees.sql</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo "done."</div>
<div>
<br /></div>
<div>
Then I started monitoring the new MySQL instance within MEM:</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirXTCeSdJNzpo-N4wflrxcy3z4m9zY7wZk-3AoEH_nGjcsDVfLRtkLAMi7OYT4I01fbojCj-aQPqoXGSMowUUe1Tdb7Tccc2QdAy9gR09R2lRu2VQoZJ9FwlprlreSfgqaaOTQgAGgXK0g/s1600/add_instance.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirXTCeSdJNzpo-N4wflrxcy3z4m9zY7wZk-3AoEH_nGjcsDVfLRtkLAMi7OYT4I01fbojCj-aQPqoXGSMowUUe1Tdb7Tccc2QdAy9gR09R2lRu2VQoZJ9FwlprlreSfgqaaOTQgAGgXK0g/s1600/add_instance.png" height="363" width="640" /></a></div>
<div>
<br /></div>
<div>
Then I created a simple script to execute a slow query on our sample data:</div>
<div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
[root@mylab matt]# cat runslowquery.sh </div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
#!/bin/sh</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px; min-height: 17px;">
<br /></div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
ITERATIONS=$1</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px; min-height: 17px;">
<br /></div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
if test -z $ITERATIONS || [ "$ITERATIONS" -le 0 ]; then</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
ITERATIONS=10</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
fi</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px; min-height: 17px;">
<br /></div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
mysqlslap --port=3306 -c 50 -i ${ITERATIONS} --create-schema=test \</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
-q "select * from employees.employees, employees.salaries where employees.emp_no = salaries.emp_no order by salary desc limit 10"</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px; min-height: 17px;">
<br /></div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
exit 0</div>
</div>
<div>
<br /></div>
<div>
Then I adjusted the CPU usage advisor a bit so as to ensure that I can also get a simulated machine level (rather than MySQL instance level) critical alert about high CPU usage (just as an FYI):</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg952bdYzC7RPdpzEIzt72BSM4ZsU7mX3KyTKjxS4yLMtefoigxpUs4K-vE-x8o4FNwewxY2KqV7flsWc4VYFWfKagDaKmCCRqktwtu45p0VfId0BZo0ppR7FuYXV8KVMYVjSpDD_OqWpkT/s1600/cpu_advisor.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg952bdYzC7RPdpzEIzt72BSM4ZsU7mX3KyTKjxS4yLMtefoigxpUs4K-vE-x8o4FNwewxY2KqV7flsWc4VYFWfKagDaKmCCRqktwtu45p0VfId0BZo0ppR7FuYXV8KVMYVjSpDD_OqWpkT/s1600/cpu_advisor.png" height="362" width="640" /></a></div>
<div>
<br /></div>
<div>
Now let's finally simulate the situation where a developer adds a new query to the application; one that is in dire need of some performance tuning:</div>
<div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
[root@mylab matt]# ./runslowquery.sh 50</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
Benchmark</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>Average number of seconds to run all queries: 66.574 seconds</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>Minimum number of seconds to run all queries: 59.725 seconds</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>Maximum number of seconds to run all queries: 78.115 seconds</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>Number of clients running queries: 50</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>Average number of queries per client: 1</div>
</div>
<div>
<br /></div>
<div>
Then let's come back to MEM to see the critical alerts for this MySQL instance:</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihwI6_TMPrx8NLZmSwXeiXOG7ygE6yfnSzdenuSFeNxl3wELJAqgRtxo-wr3MnGIF5b2vx4QKlvPSzAmwb3JXTVbLWCyXOyD3_oQDLD8Tkf_9nftvSXKR6IBECaqk3wj5kHnLGOMymwlYC/s1600/events.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihwI6_TMPrx8NLZmSwXeiXOG7ygE6yfnSzdenuSFeNxl3wELJAqgRtxo-wr3MnGIF5b2vx4QKlvPSzAmwb3JXTVbLWCyXOyD3_oQDLD8Tkf_9nftvSXKR6IBECaqk3wj5kHnLGOMymwlYC/s1600/events.png" height="362" width="640" /></a></div>
<div>
<br /></div>
<div>
The most serious issue is that we're currently experiencing a query pileup. This is because we cannot execute this query as fast as it's coming in. For example, the developer may have added a new query that's executed each time a user logs in and it's examining 2 billion rows. So now we know right away that there's likely N problematic queries. And when we look at the Query Analyzer (note: no additional setup is needed for MySQL 5.6 and later, as it uses <a href="http://dev.mysql.com/doc/refman/5.6/en/performance-schema.html" target="_blank">Performance Schema</a> for the QUAN data) for this instance, the problematic query immediately jumps out at us as it's at the top of our list and it has a <a href="http://dev.mysql.com/doc/mysql-monitor/3.0/en/mem-features-qrti.html" target="_blank">QRTi</a> score of 0:</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCPuU1QtJYjXWKgO3eGafKfynfbFqlvtSKsOmy19rJgIHRco5ONBWBjvXgXWkX9malIU3NKZ9XHccS4IupJViymgG04hsqL0jSq-2zVmeEPayR72ittPFTziaIheCyFlpW1GI6kXUouvH5/s1600/quan.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCPuU1QtJYjXWKgO3eGafKfynfbFqlvtSKsOmy19rJgIHRco5ONBWBjvXgXWkX9malIU3NKZ9XHccS4IupJViymgG04hsqL0jSq-2zVmeEPayR72ittPFTziaIheCyFlpW1GI6kXUouvH5/s1600/quan.png" height="362" width="640" /></a></div>
<div>
<br /></div>
<div>
From there we can get every possible statistic about the query. We can see when the query was first introduced--a new application was added this morning that's using this DB instance!?--how many rows it's examining each time, if a temp table is used, if a sort file on disk is used, what the join order was, etc. We can also see a <a href="http://dev.mysql.com/doc/mysql-monitor/3.0/en/mem-query-analyzer-queries.html#fig-mem-quan-item-summary" target="_blank">sample query</a> and the <a href="http://dev.mysql.com/doc/mysql-monitor/3.0/en/mem-query-analyzer-queries.html" target="_blank">EXPLAIN output</a> for the problematic query. With all of this information we can then determine exactly how to try and improve the problematic query. </div>
<div>
<br /></div>
<div>
As you can see, it's extremely easy to identify a problematic query with the Query Analyzer. And since it also provides you with every possible detail about the query, it makes determining how we might improve the query very easy as well.</div>
<div>
<br /></div>
<div>
I hope that this was helpful! Please let me know if you have any thoughts or comments. And as always, <b>Thank you</b> for using MySQL!<br />
<br />
P.S. If you're not already using <a href="http://www.mysql.com/products/enterprise/" target="_blank">MySQL Enterprise</a>, then I encourage you to try it out today! You can get started right now using a <a href="http://www.mysql.com/trials/" target="_blank">30 day trial license</a>. </div>
<br />
<br />
<br />
<br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/14733205485831945725noreply@blogger.com1tag:blogger.com,1999:blog-1362727449729800774.post-52024003889021919042014-11-12T16:39:00.004-08:002014-11-14T15:44:11.560-08:00Setting up a MySQL Enterprise Monitor 3 Test EnvironmentI wanted to quickly walk through my automated test environment setup for <a href="http://www.mysql.com/products/enterprise/monitor.html" target="_blank">MySQL Enterprise Monitor</a> (MEM). In doing so, I hope to help demonstrate how MEM 3 can easily be managed within an automated environment--whether you're using puppet, chef, cfengine, ansible, salt, $TheNextCoolDevOpsTool, or your own custom shell scripts like I am.<br />
<br />
Here's how I setup my test environment:<br />
<br />
1. I copy a "fresh" data directory into N locations.<br />
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
shell# cat createtestenv.sh </div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
#!/bin/sh</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px; min-height: 17px;">
<br /></div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo -n "Setting up fresh mysqld_multi setup..."</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px; min-height: 17px;">
<br /></div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
cp -R /var/lib/mysqlfresh /var/lib/mysql</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
cp -R /var/lib/mysqlfresh /var/lib/mysql2</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
cp -R /var/lib/mysqlfresh /var/lib/mysql3</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
chown -R mysql:mysql /var/lib/mysql*</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px; min-height: 17px;">
<br /></div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo " done."</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px; min-height: 17px;">
<br /></div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo -n "Starting fresh mysqld instances..."</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
/etc/init.d/mysql start</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo " done."</div>
<div>
<br /></div>
<div>
2. I install the MEM service manager.</div>
<div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo </div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo "### Beggining MEM install: `date`"</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px; min-height: 17px;">
<br /></div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo -n "Installing monitor..."</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
/root/mysqlmonitor.bin --mode "unattended" --unattendedmodeui "minimal" \<br />
--installdir "/opt/mysql/enterprise/monitor" --adminuser "manager" \<br />
--adminpassword "manager"</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo " done."</div>
</div>
<br />
3. I install the Agent in one of two ways.
<br />
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
#echo -n "Installing agent in host-only mode..."</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
# Install Agent in host only mode</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
#/root/mysqlmonitoragent.bin --mode "unattended" --unattendedmodeui "minimal" \<br />
#--agent_installtype "standalone" --managerhost "localhost" --managerport 18443 \<br />
#--agentuser "agent" --agentpassword "agent"</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px; min-height: 17px;">
<br /></div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo -n "Installing agent in 'phone home' mode..."</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
# Install Agent in "phone home" mode, to enable auto monitoring</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
/root/mysqlmonitoragent.bin --mode "unattended" --unattendedmodeui "minimal" \<br />
--mysqlhost "localhost" --mysqlport 3306 --managerhost "localhost" \<br />
--mysqluser "root" --mysqlpassword "root" --managerport 18443 --agentuser "agent" \<br />
--agentpassword "agent" --generaluser "matt" --generalpassword "matt" \<br />
--limiteduser "sid" --limitedpassword "sid" --agent_autocreate 1 \<br />
--mysqlconnectiongroup "Production"</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px; min-height: 17px;">
<br /></div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
/etc/init.d/mysql-monitor-agent start > /dev/null 2>&1</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo " done."</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px; min-height: 17px;">
<br /></div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo "### Ending MEM install: `date`"</div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 13px;">
echo</div>
<br />
This demonstrates how you can use the unattended installation methods to easily script the installation and setup of the <a href="http://dev.mysql.com/doc/mysql-monitor/3.0/en/mem-introduction-server.html" target="_blank">MEM Service Manager</a> and the <a href="http://dev.mysql.com/doc/mysql-monitor/3.0/en/mem-introduction-agent.html" target="_blank">Agent</a>. You can also then configure the Service Manager so that it will automatically begin monitoring any of the Agents that "phone home" (my own likely annoying terminology). You would do that using the <a href="http://dev.mysql.com/doc/mysql-monitor/3.0/en/mysql-process-discovery-advisor-ref.html" target="_blank">MySQL Process Discovery Advisor</a>. You can see a screenshot of where that's done below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjresChs19QGUJGdP-CH3RyFCmbwbm4alAYJcXk5YJQ_W9BimcgZ_zEUcs5MFwl0e3s_aips8qrmUVAUSCyENxRhuVX7QIxyeKmdm3zyzBEcjKiaNvB916Au6bNpUDYLC79RuUtHQd9QUsS/s1600/phone_home-screen.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="352" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjresChs19QGUJGdP-CH3RyFCmbwbm4alAYJcXk5YJQ_W9BimcgZ_zEUcs5MFwl0e3s_aips8qrmUVAUSCyENxRhuVX7QIxyeKmdm3zyzBEcjKiaNvB916Au6bNpUDYLC79RuUtHQd9QUsS/s640/phone_home-screen.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Using these methods you can have a MEM Agent installed and set up on any new machine that gets created and have it automatically reach out to the Service Manager. Then the Service Manager can begin monitoring that Agent and the associated MySQL instance using the default credentials specified. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I hope that this is helpful! Several people have asked me about how I set things up for my own testing and demos, so I wanted to share. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>Thank you</b> for using MySQL! </div>
<br />Anonymoushttp://www.blogger.com/profile/14733205485831945725noreply@blogger.com0tag:blogger.com,1999:blog-1362727449729800774.post-62052877832954364842014-10-31T11:02:00.000-07:002014-11-03T07:30:40.509-08:00Monitoring MySQL from Oracle Enterprise Manager<h3>
<span style="font-weight: normal;"><br /></span></h3>
<h3 style="text-align: center;">
<span style="font-weight: normal;">I wanted to quickly remind everyone that we recently <a href="http://www.oracle.com/us/corporate/press/2301492" target="_blank">announced</a> the GA release of <a href="http://www.mysql.com/products/enterprise/em.html" target="_blank">Oracle Enterprise Manager for MySQL</a>.</span></h3>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHUhJQ2lB7o_ZaA8-PEfGV_PhEZemghIcXcRHhjdz4DG0G9R2kOd_MMguQsjtCyGT_WN83A4s8ZmmXwBvRqE-wM7KzRDeZyfFteNsUPb6KZ3JDQccc93KjZ9EASTE8yUvLlelo7ml3oYwK/s1600/EM_mysqltarget_landingpage_mouseover.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHUhJQ2lB7o_ZaA8-PEfGV_PhEZemghIcXcRHhjdz4DG0G9R2kOd_MMguQsjtCyGT_WN83A4s8ZmmXwBvRqE-wM7KzRDeZyfFteNsUPb6KZ3JDQccc93KjZ9EASTE8yUvLlelo7ml3oYwK/s1600/EM_mysqltarget_landingpage_mouseover.png" height="222" width="400" /></a></div>
<br />
<br />
We know that many existing Oracle Database customers are also using MySQL, so we're very excited that you can now manage your entire hardware and software stack, <b>including MySQL</b>, all from within a single tool.<br />
<br />
I also wanted to take the opportunity to answer a few common questions that I've seen come up over the last few weeks:<br />
<br />
<b>Q:</b> Can I use the new Plugin with Oracle Enterprise Manager 11g (Grid Control)?<br />
<b>A:</b> No. The Plugin requires Oracle Enterprise Manager 12c release 4 or later.<br />
<br />
<b>Q:</b> Where can I download the Plugin?<br />
<b>A:</b> The Plugin is available via <a href="http://docs.oracle.com/cd/E24628_01/doc.121/e24473/self_update.htm#EMADM13221" target="_blank">Self Update</a> within Oracle Enterprise Manager 12c release 4 and later. It's also available via <a href="http://support.oracle.com/" target="_blank">My Oracle Support</a> and the <a href="http://edelivery.oracle.com/" target="_blank">Oracle Software Delivery Cloud</a>. You can find more information about the installation process <a href="http://dev.mysql.com/doc/mysql-em-plugin/en/myoem-installation-reference.html" target="_blank">here</a>.<br />
<br />
<b>Q:</b> Can I monitor MySQL Community Edition (GPL licensed) Targets?<br />
<b>A:</b> Yes. There are no technical restrictions or behavioral differences for the Plugin depending on whether the MySQL Target is Community or Enterprise Edition. The licensed use of the Plugin to monitor that Target, however, is only covered by the <a href="http://www.mysql.com/trials/" target="_blank">30 day trial license</a> or a <a href="http://www.mysql.com/products/" target="_blank">MySQL Enterprise license</a>. If you have a valid license that covers the MySQL Target being monitored, then it does not matter which Edition of MySQL the Target is running.<br />
<br />
<b>Q:</b> Where can I find documentation about the Plugin?<br />
<b>A:</b> You can find it <a href="http://dev.mysql.com/doc/mysql-em-plugin/en/index.html" target="_blank">here</a> and <a href="http://docs.oracle.com/cd/E24628_01/doc.121/e57639/toc.htm" target="_blank">here</a>.<br />
<br />
We look forward to hearing your feedback on this new addition to <a href="http://www.mysql.com/products/enterprise/" target="_blank">MySQL Enterprise</a>! Please let us know if you <a href="http://support.oracle.com/" target="_blank">have any questions</a>, <a href="http://bugs.mysql.com/" target="_blank">encounter any problems</a>, or have any feature requests. You can also engage in a discussion on <a href="http://forums.mysql.com/list.php?142" target="_blank">our forums</a>. Lastly, feel free to reach out to me directly as well, either here in the comments or via <a href="mailto:matt.lord@oracle.com" target="_blank">email</a>. Thank you for using MySQL!<br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/14733205485831945725noreply@blogger.com0tag:blogger.com,1999:blog-1362727449729800774.post-1031261454157672762013-12-13T06:51:00.001-08:002013-12-13T08:37:57.898-08:00Monitoring MySQL in the 21st CenturyIn todays computing environments, the use of cloud based technologies--both public and private--along with various popular devops automation tools, are essential to effective and efficient IT operations.<br />
<br />
MySQL Enterprise Monitor (MEM) 3 integrates very well into these modern operations environments. To demonstrate that point, I've created two short video demos that walk you through some helpful examples.<br />
<br />
The first one walks through how you can monitor MySQL instances in the public cloud, using Amazon RDS as an example provider:<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="//www.youtube.com/embed/a_91iSUfeWA" width="420"></iframe>
<br />
<br />
The second one walks through some examples of how you can integrate MEM 3 with your private cloud and devops automation tools:<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="//www.youtube.com/embed/cK5HxhJrXns" width="420"></iframe><br />
<br />
<a href="http://www.blogger.com/"></a><span id="goog_1860974855"></span><span id="goog_1860974856"></span>You can find additional video demos, and more information about MEM 3 <a href="http://www.mysql.com/products/enterprise/monitor.html" target="_blank">here</a>.<br />
<br />
MySQL Enterprise Monitor is just one part of what you get with a MySQL Enterprise subscription. You can find more information on the MySQL Enterprise subscriptions, and all that it includes, <a href="http://www.mysql.com/products/enterprise/" target="_blank">here</a>.<br />
<br />Anonymoushttp://www.blogger.com/profile/14733205485831945725noreply@blogger.com1tag:blogger.com,1999:blog-1362727449729800774.post-18768595041254597032013-08-13T21:42:00.000-07:002013-08-22T09:56:52.487-07:00See you at MySQL Connect!<div class="separator" style="clear: both; text-align: center;">
</div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO6fVUHYBk745TG3YsUurrFGOYbQCx7IwYj-iwFO9uvtQxk6xbI0XnwGAhbH_PCzXnMcnnCVdUvZ1PX2W-TjJrA0kaTdw3AYEUX_QI7dfctc3AV-CVsZlLwqasUpNi2yKD-4-cV22EdIpg/s1600/183037-mysql-tk-joinme-200x200-1951668.gif" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO6fVUHYBk745TG3YsUurrFGOYbQCx7IwYj-iwFO9uvtQxk6xbI0XnwGAhbH_PCzXnMcnnCVdUvZ1PX2W-TjJrA0kaTdw3AYEUX_QI7dfctc3AV-CVsZlLwqasUpNi2yKD-4-cV22EdIpg/s1600/183037-mysql-tk-joinme-200x200-1951668.gif" /></a></div>
<br /></div>
The MySQL Connect conference is a great opportunity to engage with the MySQL community, as well as the engineers who work on the MySQL technologies at Oracle. The conference takes place on September 21-23 in San Francisco. There are 84 sessions in total, the full list being available <a href="https://oracleus.activeevents.com/2013/connect/focusOnDoc.do?focusID=22669" target="_blank">here.</a><br />
<div>
<br /></div>
<div>
<a href="https://oracleus.activeevents.com/2013/connect/speakerDetail.ww?PERSON_ID=E691845DC5DF41FEC89F88738A58E2DE">I</a> will be presenting this year too. <a href="https://oracleus.activeevents.com/2013/connect/speakerDetail.ww?PERSON_ID=E535E4479BB4CCF1AB74017DAED5851F" target="_blank">Sveta</a> and I will be talking about how you can best deal with some of the most common challenges people encounter when creating and managing their MySQL backups in our <a href="https://oracleus.activeevents.com/2013/connect/sessionDetail.ww?SESSION_ID=2264" target="_blank">Making Backups in Extreme Situations</a> session, which is scheduled for 16:00-17:00 on the 21st in the Hilton - Union Square Room 3/4. </div>
<div>
<br /></div>
<div>
I will also be helping out with various Hands On Labs (HOLs) that are planned, along with helping to man the official Oracle booth in the expo center.</div>
<div>
<br /></div>
<div>
I look forward to seeing many old faces and friends, and to making many new ones. Come and enjoy this great conference along with us!<br />
<br />
<br />
<br />
<br />
<br />
<br />
<a href="http://www.oracle.com/mysqlconnect/index.html">MySQL Connect</a> is only about 5 weeks away! Have you registered? If not, <a href="http://www.oracle.com/mysqlconnect/register/packages/index.html">sign up now</a> to save US$300 over the onsite price. And, remember you have the opportunity this year to add <a href="http://www.oracle.com/mysqlconnect/tutorials/index.html">a third day of tutorials</a> to your registration. Check out the <a href="https://blogs.oracle.com/MySQL/entry/top_10_reasons_to_attend">Top 10 Reasons to Attend MySQL Connect</a> to learn more.</div>
Anonymoushttp://www.blogger.com/profile/14733205485831945725noreply@blogger.com0tag:blogger.com,1999:blog-1362727449729800774.post-22469195146050709302013-06-24T06:23:00.000-07:002013-06-24T06:23:49.791-07:00Improving two-way communication.<h3>
You spoke:</h3>
<a href="http://bugs.mysql.com/bug.php?id=41706">http://bugs.mysql.com/bug.php?id=41706</a><br />
<br />
<h3>
And we listened:</h3>
<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgR6oKbtjLjPl1s5LkT1pi76VNU3-YIykIWnZvmjPJnkh6m4RsMj3s-Hzey7cZafGRtR2ih0tFjAp_lmW_UR05vMUnM4AWd8tIfx_Y0_A-trbkLFN_kCsKGDBYzBAGF3LcX01j3-sdbUyQa/s1600/affects_me_not.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="115" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgR6oKbtjLjPl1s5LkT1pi76VNU3-YIykIWnZvmjPJnkh6m4RsMj3s-Hzey7cZafGRtR2ih0tFjAp_lmW_UR05vMUnM4AWd8tIfx_Y0_A-trbkLFN_kCsKGDBYzBAGF3LcX01j3-sdbUyQa/s320/affects_me_not.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Now you can quickly and easily note that a bug or feature request affects you.</td></tr>
</tbody></table>
<br />
<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLTqDEC50d7FNgTPLR5H1F5nv9_mvxuxPYoN6j2koc3TuOjhLtfIJ9XG1-hhrssdob2Lr_k6wK3YI0FwdQM4NGJOPiDqPz5hSAMfxPdOvIfGXdLtRD_GYFgYIQqrnpXcUgXXIerZJySSQT/s1600/affects_me.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="123" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLTqDEC50d7FNgTPLR5H1F5nv9_mvxuxPYoN6j2koc3TuOjhLtfIJ9XG1-hhrssdob2Lr_k6wK3YI0FwdQM4NGJOPiDqPz5hSAMfxPdOvIfGXdLtRD_GYFgYIQqrnpXcUgXXIerZJySSQT/s320/affects_me.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">When you subsequently view the report, you will see that status indicated.</td></tr>
</tbody></table>
<br />
<br />
<br />
We highly value user input here at MySQL, and we wish to foster a vibrant environment of healthy two-way communication between our users and the internal teams. This is simply an initial move toward that bigger goal.<br />
<br />
Our community of users and customers have always helped to drive the direction of MySQL, so we encourage you to continue to provide us with your feedback. I'm happy to announce that now, that's gotten just a little bit easier.<br />
<br />
<br />
As always, thank you!<br />
<br />
<br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/14733205485831945725noreply@blogger.com5