<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>LoadRunner TnT &#187; MySQL</title>
	<atom:link href="http://www.loadrunnertnt.com/tag/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.loadrunnertnt.com</link>
	<description>Performance Testing, LoadRunner Tips &#38; Tricks</description>
	<lastBuildDate>Mon, 08 Mar 2010 07:57:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How-to configure MySQL database monitoring</title>
		<link>http://www.loadrunnertnt.com/how-tos/how-to-configure-mysql-database-monitoring/</link>
		<comments>http://www.loadrunnertnt.com/how-tos/how-to-configure-mysql-database-monitoring/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 13:13:52 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[How-Tos]]></category>
		<category><![CDATA[LoadRunner]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[SiteScope]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=107</guid>
		<description><![CDATA[In LoadRunner (as of this writing which is version 9.0), the supported databases that can be monitored are mainly proprietary, such as, Microsoft SQL, Oracle, Sybase and DB2. Open sources such as MySQL are not supported. In order to monitor this type of databases, we have to employ alternative methods. And one of it, is [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="MySQL" src="http://loadrunnertnt.com/images/mysql_logo.jpg" alt="" width="171" height="99" />In LoadRunner (as of this writing which is version 9.0), the supported databases that can be monitored are mainly proprietary, such as, Microsoft SQL, Oracle, Sybase and DB2. Open sources such as MySQL are not supported. In order to monitor this type of databases, we have to employ alternative methods. And one of it, is to utilize SiteScope.</p>
<p>MySQL database monitoring will require SiteScope to be deployed acting as a bridging collector before it can be displayed in LoadRunner. The connection is illustrated in the following.<span id="more-107"></span></p>
<div>
<p><strong>Fig. 1 Monitoring MySQL Setup</strong></p>
<p><img title="SiteScope MySQL Setup" src="http://loadrunnertnt.com/images/sitescope_mysql_setup.jpg" alt="" width="577" height="268" /></div>
<p>The specified statistics retrieval mechanism utilizes <strong>Database Query monitor</strong> in SiteScope. This is done by logging into MySQL database via SiteScope Database Query monitor and issuing a <strong>SHOW STATUS</strong> command to retrieve the statistics. Example of the command is as followed:</p>
<p><em>show status where variable_name like ’innodb_buffer_pool_pages_total’ </em></p>
<p>Therefore, prior this monitor setup, <strong>SiteScope</strong> should already be deployed or considered in the deployment. Refer to SiteScope setup for more information. The ports between LoadRunner and SiteScope, SiteScope and MySQL should be opened on <strong>TCP 8888</strong> and <strong>TCP 3306</strong> respectively by default. On top of this basic requirement, monitoring a MySQL database requires the use of <strong>JDBC Driver</strong>, which SiteScope uses to interact with the <strong>MySQL</strong> database.</p>
<p>In summary, what you need before the setup is as followed.</p>
<ul>1. SiteScope to be deployed.<br />
2. Sufficient license points for Database Query monitor.<br />
3. TCP 8888 (default) opened two-way for LoadRunner to SiteScope.<br />
4. TCP 3306 (default) opened two-way for SiteScope to MySQL.<br />
5. Monitoring privileges for SiteScope to monitor MySQL.<br />
6. JDBC driver to be installed on SiteScope.<br />
7. Have knowledge of the counter you want to monitor.</ul>
<p>Let’s go into the details!</p>
<ul>1. Download the JDBC driver from <a href="http://www.mysql.com/downloads/api-jdbc.html" target="_blank"><span style="text-decoration: underline;"><span style="color: #0066cc;">MySQL Download Connectors page</span></span></a>.<br />
2. Uncompress the distribution file.<br />
3. Among all the other files, find and extract a file with <strong>.jar extension</strong> to <em>Sitescope/java/lib/ext</em> directory. (Source: SiteScope Monitor Guide)<br />
4. Gather information about the <strong>hostname</strong> of the server and the <strong>database instance</strong> prior this step. In SiteScope console, add <strong>Database Query monitor</strong> to the existing monitoring group for the server (refer to SiteScope User Guide for more information). You should have the Name the monitor as <em>mysql-{status_variable}</em> to standardize the monitors (e.g. <em>mysql-innodb_buffer_pool_pages_total</em>).<br />
5. In the settings enter the following:</ul>
<p><strong>Fig. 2 SiteScope Settings</strong></p>
<p><img title="SiteScope MySQL Settings" src="http://loadrunnertnt.com/images/sitescope-mysql-settings.JPG" alt="" width="579" height="395" /></p>
<p><strong>Frequencies </strong></p>
<p>What SiteScope documentation proposes is:</p>
<ul>- For most critical and common query 2-5min.<br />
- Database statistics that change less frequently can be monitored every 30 or 60min.</ul>
<p>(Source: SiteScope Monitor Guide)</p>
<p>As for me, what I feel is to run the query at about 15-30secs interval as typical <strong>LoadRunner</strong> monitoring, it is defaulted at 15 secs. However by doing so, it may create additional overhead for making the query.</p>
<p><strong>Database Connection </strong></p>
<ul>
<li>Enter in the following format: <em>Jdbc:mysql://{database hostname}[:{tcp port}]/{database} </em></li>
<li>E.g. <em>jdbc:mysql://DB-MySQL01:3306/mysql </em></li>
</ul>
<p><strong>Database Driver</strong></p>
<ul>
<li> Enter following: <em>org.gjt.mm.mysql.Driver </em>(This Database Driver only applies for MySQL JDBC driver)</li>
</ul>
<p><strong>Query</strong></p>
<ul>
<li> Enter the Command Line for Query to Database</li>
<li>E.g. <em>show status where variable_name like ’innodb_buffer_pool_pages_total’</em></li>
<li>You can also run queries that directly execute on table based on your needs!</li>
</ul>
<p><strong>Advanced Settings</strong></p>
<ul>
<li>Enter Database <strong>User Name</strong> and Database <strong>Password</strong> for logging in of <strong>MySQL</strong> Database. I’m using root account to execute the query. I’m not too sure if there is any possibility of knowing the correct privilege needed to monitor. If you do, please let us know.</li>
</ul>
<p>Upon successful connection, you will prompt with ‘Successful Connection’ and the time Sitescope took to Query MySQL Database.</p>
<p>If you need to monitor another <strong>MySQL counter</strong>, a new monitor needs to be created. Example, if you want to monitor the <strong>Qcache_hits</strong>, you will have to perform step 4 to step 5 again for this new counter. Do ensure you have sufficient SiteScope license points for another monitor!</p>
<p>This concludes the monitoring for MySQL database server. Point to note that the queries executed may cause overhead to the database server which may required you to balance the pros and cons to implement this monitor.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/how-tos/how-to-configure-mysql-database-monitoring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL database server counter reference</title>
		<link>http://www.loadrunnertnt.com/concepts/mysql-database-server-counter-reference/</link>
		<comments>http://www.loadrunnertnt.com/concepts/mysql-database-server-counter-reference/#comments</comments>
		<pubDate>Tue, 22 Apr 2008 04:45:45 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[Concepts]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=270</guid>
		<description><![CDATA[These are the counters provided by running show status command in MySQL (as of this writing, I’m writing based on MySQL 6.0). It will be the same command to retrieve statistics as mentioned in “How-to configure MySQL database monitoring” which you can refer back again to for concept and configuration details. I’ve list down the [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="MySQL" src="http://loadrunnertnt.com/images/mysql_logo.jpg" alt="" width="171" height="99" />These are the counters provided by running show status command in <strong>MySQL</strong> (as of this writing, I’m writing based on <strong>MySQL 6.0</strong>). It will be the same command to retrieve statistics as mentioned in <a href="http://www.loadrunnertnt.com/?p=107" target="_blank"><span style="text-decoration: underline;"><span style="color: #0066cc;">“How-to configure MySQL database monitoring”</span></span></a> which you can refer back again to for concept and configuration details. I’ve list down the counters for your convenience at first glance if you are looking for what to monitor in MySQL. I believed that you can agree with me that we are not experts in MySQL during load test projects.<span id="more-270"></span></p>
<p>Anyway, the definition of the counters can be found in <a href="http://dev.mysql.com/doc/refman/6.0/en/server-status-variables.html" target="_blank"><span style="text-decoration: underline;"><span style="color: #0066cc;">“MySQL 6.0 Reference Manual :: 5 MySQL Server Administration :: 5.1 The MySQL Server :: 5.1.5 Status Variables”</span></span></a> which you should refer to when in doubt.</p>
<p><span style="text-decoration: underline;">List of MySQL counters</span></p>
<div>
<table style="height: 1486px;" border="0" cellspacing="0" cellpadding="3" width="382">
<tbody>
<tr>
<td width="50%" valign="top">Aborted_clients<br />
Aborted_connects<br />
Binlog_cache_disk_use<br />
Binlog_cache_use<br />
Bytes_received<br />
Bytes_sent<br />
Com_admin_commands<br />
Com_alter_db<br />
Com_alter_event<br />
Com_alter_table<br />
Com_analyze<br />
Com_backup<br />
Com_backup_table<br />
Com_begin<br />
Com_call_procedure<br />
Com_change_db<br />
Com_change_master<br />
Com_check<br />
Com_checksum<br />
Com_commit<br />
Com_create_db<br />
Com_create_event<br />
Com_create_function<br />
Com_create_index<br />
Com_create_table<br />
Com_create_user<br />
Com_dealloc_sql<br />
Com_delete<br />
Com_delete_multi<br />
Com_do<br />
Com_drop_db<br />
Com_drop_event<br />
Com_drop_function<br />
Com_drop_index<br />
Com_drop_table<br />
Com_drop_user<br />
Com_execute_sql<br />
Com_flush<br />
Com_grant<br />
Com_ha_close<br />
Com_ha_open<br />
Com_ha_read<br />
Com_help<br />
Com_insert<br />
Com_insert_select<br />
Com_kill<br />
Com_load<br />
Com_lock_tables<br />
Com_optimize<br />
Com_preload_keys<br />
Com_prepare_sql<br />
Com_purge<br />
Com_purge_before_date<br />
Com_rename_table<br />
Com_repair<br />
Com_replace<br />
Com_replace_select<br />
Com_reset<br />
Com_restore<br />
Com_restore_table<br />
Com_revoke<br />
Com_revoke_all<br />
Com_rollback<br />
Com_savepoint<br />
Com_select<br />
Com_set_option<br />
Com_show_binlog_events<br />
Com_show_binlogs<br />
Com_show_charsets<br />
Com_show_collations<br />
Com_show_column_types<br />
Com_show_create_db<br />
Com_show_create_event<br />
Com_show_create_table<br />
Com_show_databases<br />
Com_show_engine_logs<br />
Com_show_engine_mutex<br />
Com_show_engine_status<br />
Com_show_errors<br />
Com_show_events<br />
Com_show_fields<br />
Com_show_grants<br />
Com_show_innodb_status<br />
Com_show_keys<br />
Com_show_logs<br />
Com_show_master_status<br />
Com_show_ndb_status<br />
Com_show_new_master<br />
Com_show_open_tables<br />
Com_show_plugins<br />
Com_show_privileges<br />
Com_show_processlist<br />
Com_show_slave_hosts<br />
Com_show_slave_status<br />
Com_show_status<br />
Com_show_storage_engines<br />
Com_show_tables<br />
Com_show_triggers<br />
Com_show_variables<br />
Com_show_warnings<br />
Com_slave_start<br />
Com_slave_stop<br />
Com_stmt_close<br />
Com_stmt_execute<br />
Com_stmt_fetch<br />
Com_stmt_prepare<br />
Com_stmt_reset<br />
Com_stmt_send_long_data<br />
Com_truncate<br />
Com_unlock_tables<br />
Com_update<br />
Com_update_multi<br />
Com_xa_commit<br />
Com_xa_end<br />
Com_xa_prepare<br />
Com_xa_recover<br />
Com_xa_rollback<br />
Com_xa_start<br />
Compression<br />
Connections<br />
Created_tmp_disk_tables<br />
Created_tmp_files<br />
Created_tmp_tables</td>
<td width="50%" valign="top">
<div>Delayed_errors</div>
<p>Delayed_insert_threads<br />
Delayed_writes<br />
Flush_commands<br />
Handler_commit<br />
Handler_delete<br />
Handler_discover<br />
Handler_prepare<br />
Handler_read_first<br />
Handler_read_key<br />
Handler_read_next<br />
Handler_read_prev<br />
Handler_read_rnd<br />
Handler_read_rnd_next<br />
Handler_rollback<br />
Handler_savepoint<br />
Handler_savepoint_rollback<br />
Handler_update<br />
Handler_write<br />
Innodb_buffer_pool_pages_data<br />
Innodb_buffer_pool_pages_dirty<br />
Innodb_buffer_pool_pages_flushed<br />
Innodb_buffer_pool_pages_free<br />
Innodb_buffer_pool_pages_latched<br />
Innodb_buffer_pool_pages_misc<br />
Innodb_buffer_pool_pages_total<br />
Innodb_buffer_pool_read_ahead_rnd<br />
Innodb_buffer_pool_read_ahead_seq<br />
Innodb_buffer_pool_read_requests<br />
Innodb_buffer_pool_reads<br />
Innodb_buffer_pool_wait_free<br />
Innodb_buffer_pool_write_requests<br />
Innodb_data_fsyncs<br />
Innodb_data_pending_fsyncs<br />
Innodb_data_pending_reads<br />
Innodb_data_pending_writes<br />
Innodb_data_read<br />
Innodb_data_reads<br />
Innodb_data_writes<br />
Innodb_data_written<br />
Innodb_dblwr_pages_written<br />
Innodb_dblwr_writes<br />
Innodb_log_waits<br />
Innodb_log_write_requests<br />
Innodb_log_writes<br />
Innodb_os_log_fsyncs<br />
Innodb_os_log_pending_fsyncs<br />
Innodb_os_log_pending_writes<br />
Innodb_os_log_written<br />
Innodb_page_size<br />
Innodb_pages_created<br />
Innodb_pages_read<br />
Innodb_pages_written<br />
Innodb_row_lock_current_waits<br />
Innodb_row_lock_time<br />
Innodb_row_lock_time_avg<br />
Innodb_row_lock_time_max<br />
Innodb_row_lock_waits<br />
Innodb_rows_deleted<br />
Innodb_rows_inserted<br />
Innodb_rows_read<br />
Innodb_rows_updated<br />
Key_blocks_not_flushed<br />
Key_blocks_unused<br />
Key_blocks_used<br />
Key_read_requests<br />
Key_reads<br />
Key_write_requests<br />
Key_writes<br />
Last_query_cost<br />
Max_used_connections<br />
Ndb_cluster_node_id<br />
Ndb_config_from_host<br />
Ndb_config_from_port<br />
Ndb_conflict_fn_max<br />
Ndb_conflict_fn_old<br />
ndb_execute_count<br />
Ndb_number_of_data_nodes<br />
Not_flushed_delayed_rows<br />
Open_files<br />
Open_streams<br />
Open_table_definitions<br />
Open_tables<br />
Opened_tables<br />
prepared_stmt_count<br />
Qcache_free_blocks<br />
Qcache_free_memory<br />
Qcache_hits<br />
Qcache_inserts<br />
Qcache_lowmem_prunes<br />
Qcache_not_cached<br />
Qcache_queries_in_cache<br />
Qcache_total_blocks<br />
Questions<br />
Relay_Log_Space<br />
Rpl_status<br />
Select_full_join<br />
Select_full_range_join<br />
Select_range<br />
Select_range_check<br />
Select_scan<br />
Slave_heartbeat_period<br />
Slave_open_temp_tables<br />
Slave_received_heartbeat<br />
Slave_retried_transactions<br />
Slave_running boolean<br />
Slow_launch_threads<br />
Slow_queries<br />
Sort_merge_passes<br />
Sort_range<br />
Sort_rows<br />
Sort_scan<br />
Table_locks_immediate<br />
Table_locks_waited<br />
Tc_log_max_pages_used<br />
Tc_log_page_size<br />
Tc_log_page_waits<br />
Threads_cached<br />
Threads_connected<br />
Threads_created<br />
Threads_running<br />
Uptime</td>
</tr>
</tbody>
</table>
<p><a href="http://dev.mysql.com/doc/refman/6.0/en/server-status-variables.html" target="_blank"><span style="text-decoration: underline;"><span style="color: #0066cc;">(Source: MySQL 6.0 Reference Manual)</span></span></a></div>
<p><!--adsensestart--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/concepts/mysql-database-server-counter-reference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How-to retrieve parameter data from MySQL database</title>
		<link>http://www.loadrunnertnt.com/how-tos/how-to-retrieve-parameter-data-from-mysql-database/</link>
		<comments>http://www.loadrunnertnt.com/how-tos/how-to-retrieve-parameter-data-from-mysql-database/#comments</comments>
		<pubDate>Tue, 22 Apr 2008 01:02:00 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[How-Tos]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Vugen]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=79</guid>
		<description><![CDATA[As you’ve know, LoadRunner offers the feature of retrieving parameter data from database with the Database Query Wizard in Vugen. This allows ease and alternative preparation of your parameter data for load test. By putting a little creativity on this feature, we need not limit ourselves to the example of Microsoft Access database as mentioned [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="MySQL" src="http://loadrunnertnt.com/images/mysql_logo.jpg" alt="" width="180" height="104" />As you’ve know, <strong>LoadRunner</strong> offers the feature of retrieving parameter data from database with the <strong>Database Query Wizard</strong> in Vugen. This allows ease and alternative preparation of your parameter data for load test. By putting a little creativity on this feature, we need not limit ourselves to the example of <strong>Microsoft Access</strong> database as mentioned in it’s <strong>Vugen User Guide</strong>, we can extend this feature to other types of database, say, <strong>MySQL database</strong>!</p>
<p>Let’s go through a technical overview of what you need to do for it to work!</p>
<ol>
<li> Get and install the database driver to connect to the database</li>
<li>Get the database connection string</li>
<li>Get the SQL statement for query</li>
<li>Create a new parameter using Database Query Wizard</li>
<li>Enter the connection string and the SQL statement</li>
</ol>
<p>Now, let’s go through the details here with some screenshots to make it easier to understand.<span id="more-79"></span></p>
<p><span style="text-decoration: underline;">[1] Download driver</span></p>
<p>I’ve obtained my MySQL-ODBC driver from <a href="http://dev.mysql.com/downloads/connector/odbc/3.51.html" target="_blank"><span style="text-decoration: underline;"><span style="color: #0066cc;">MySQL website</span></span></a>. You will need to find out what is the driver required to connect your database accordingly.</p>
<p><span style="text-decoration: underline;">[2] Get the database connection string</span></p>
<p>In the context of MySQL database, I referred to <a href="http://www.connectionstrings.com/?carrier=mysql" target="_blank"><span style="text-decoration: underline;"><span style="color: #0066cc;">ConnectionStrings</span></span></a>. The string that I used was for <strong>3.51 driver</strong> and I was trying out on a localhost MySQL which will looked like the below</p>
<p><em>Driver={MySQL ODBC 3.51 Driver};Server=localhost;Database=myDatabase; User=root;Password=rootpassword;Option=3;</em></p>
<p>Of course, you can refer to other type of connection string in <a href="http://www.connectionstrings.com/" target="_blank"><span style="text-decoration: underline;"><span style="color: #0066cc;">ConnectionStrings.com</span></span></a> as well! If you have tried out with other database, please let us know and we can compile them into a single source of reference point!</p>
<p><span style="text-decoration: underline;">[3] Get the SQL statement</span></p>
<p>The <strong>SQL statement</strong> that I used was show status, which actually queries the status of MySQL database. Take note, I’m just using it for example purposes, you can use conventional statements like <em>SELECT field FROM table</em>.</p>
<p><span style="text-decoration: underline;">[4] Create a new parameter using Database Query Wizard</span></p>
<p>In the script and create a new parameter using Database Query Wizard (Open Parameter list &gt; New &gt; Data Wizard &gt; Select “Specify SQL statement manually” &gt; click “Next”)</p>
<p><strong>Database Query Wizard</strong></p>
<p><img class="aligncenter" title="Parameter List Database Query" src="http://loadrunnertnt.com/images/parameter_list_database_query_wizard.PNG" alt="" width="452" height="353" /></p>
<p><span style="text-decoration: underline;">[5] Enter the Connection String and SQL statement</span></p>
<p>Enter the <strong>Connection String</strong> and <strong>SQL statement</strong>, and click <em>“Finish”</em>. If the connection string and SQL statement are valid, after you clicked <em>“Finish”</em> the parameter should be populated accordingly.</p>
<p><strong>Enter Connection String and SQL statement</strong></p>
<p><img class="aligncenter" title="Specify SQL Statement" src="http://loadrunnertnt.com/images/parameter_list_specify_SQL_statement.PNG" alt="" width="452" height="353" /><strong></strong></p>
<p><strong>Connection and query successful!</strong></p>
<p><img class="aligncenter" title="Select data from MySQL" src="http://loadrunnertnt.com/images/parameter_list_select_data_from_mySQL_completed.PNG" alt="" width="618" height="558" /></p>
<p>That’s it and done! Hope it helps you when you are using the Database Query Wizard! Do share with us if you have tried other databases with the <strong>Database Query Wizard</strong>!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/how-tos/how-to-retrieve-parameter-data-from-mysql-database/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
