<?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>PlanetMysql.ru - информация о СУБД MySQL &#187; administration</title>
	<atom:link href="http://planetmysql.ru/category/administration/feed/" rel="self" type="application/rss+xml" />
	<link>http://planetmysql.ru</link>
	<description>Блог о самой популярной СУБД MySQL</description>
	<lastBuildDate>Thu, 24 May 2012 05:41:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Compare and Synchronize Databases with MySQL Utilities</title>
		<link>http://drcharlesbell.blogspot.com/2012/05/compare-and-synchronize-databases-with.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=compare-and-synchronize-databases-with-mysql-utilities</link>
		<comments>http://drcharlesbell.blogspot.com/2012/05/compare-and-synchronize-databases-with.html#comments</comments>
		<pubDate>Wed, 09 May 2012 20:25:02 +0000</pubDate>
		<dc:creator>Chuck Bell</dc:creator>
				<category><![CDATA[administration]]></category>
		<category><![CDATA[compare]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[synchronization]]></category>
		<category><![CDATA[workbench]]></category>

		<guid isPermaLink="false">http://planetmysql.ru/?guid=a1bca4fc601318ba6ee9081ae7cac812</guid>
		<description><![CDATA[The mysqldiff and mysqldbcompare utilities were designed to produce a difference report for objects and in the case of mysqldbcompare the data. Thus, you can compare two databases and produce a report of the differences in both object definitions and data rows.&#160;While that may be very useful, would it not be much more useful to have the ability to produce SQL commands to transform databases?  Wait no longer! The latest release of MySQL Utilities has added the ability to generate SQL transformation statements by both the mysqldiff and mysqldbcompare utilities.&#160;To generate SQL transformations in either utility, simply use the --sql option to tell the utility to produce the statements.Object Transformations with mysqldiffIf you would like to compare the schema of two databases (the objects and their definitions), mysqldiff can do that for you and produce a difference report in a number of formats including CSV, TAB, GRID, and Vertical (like the mysql client’s \G option). However, its greatest feature is the ability to generate transformation statements to alter the objects so that they conform. Best of all, mysqldiff works on all object types including the ability to recognize renames so you can get a true transformation path for all objects. For even greater flexibility, you can generate the difference in both directions. This means you can generate transformations for db1-to-db2 as well as db2-to-db1 in the same pass. Cool.The following shows an example of running mysqldiff on two servers where some of the objects have diverged. It also shows how you can generate the reverse transformation statements.$ mysqldiff --server1=root@localhost --server2=root@otherhost \--changes-for=server1 --show-reverse util_test:util_test \--force --difftype=SQL# server1 on localhost: ... connected.# server2 on localhost: ... connected.# WARNING: Objects in server1.util_test but not in server2.util_test:# EVENT: e1# Comparing util_test to util_test [PASS]# Comparing util_test.f1 to util_test.f1 [PASS]# Comparing util_test.p1 to util_test.p1 [PASS]# Comparing util_test.t1 to util_test.t1 [PASS]# Comparing util_test.t2 to util_test.t2 [PASS]# Comparing util_test.t3 to util_test.t3 [FAIL]# Transformation for --changes-for=server1:#ALTER TABLE util_test.t3 DROP COLUMN b, ADD COLUMN d char(30) NULL AFTER a ENGINE=MyISAM;## Transformation for reverse changes (--changes-for=server2):## ALTER TABLE util_test.t3 # DROP COLUMN d, # ADD COLUMN b char(30) NULL AFTER a, # ENGINE=InnoDB;## Comparing util_test.trg to util_test.trg [FAIL]# Transformation for --changes-for=server1:#DROP TRIGGER IF EXISTS `util_test`.`trg`;CREATE DEFINER=root@localhost TRIGGER util_test.trg BEFORE UPDATE ON util_test.t1 FOR EACH ROW INSERT INTO util_test.t1 VALUES('Wax on, wax off');## Transformation for reverse changes (--changes-for=server2):## DROP TRIGGER IF EXISTS `util_test`.`trg`;# CREATE DEFINER=root@localhost TRIGGER util_test.trg AFTER INSERT ON util_test.t1 # FOR EACH ROW INSERT INTO util_test.t2 VALUES('Test objects count');## Comparing util_test.v1 to util_test.v1 [FAIL]# Transformation for --changes-for=server1:#ALTER VIEW util_test.v1 AS select `util_test`.`t2`.`a` AS `a` from `util_test`.`t2`;## Transformation for reverse changes (--changes-for=server2):## ALTER VIEW util_test.v1 AS # select `util_test`.`t1`.`a` AS `a` from `util_test`.`t1`;#Compare failed. One or more differences found.Generating Data Transformation with mysqldbcompareThe mysqldbcompare utility provides all of the object difference functionality included in mysqldiff along with the ability to generate transformation SQL statements for data. This means you can make sure your test or development databases are similar to your production databases or perhaps even your offline, read only databases match your online databases. Like mysqldiff, you can also get the reverse transformations at the same time. Very cool, eh?The following shows an example of running mysqldbcompare to generate differences in data.$ mysqldbcompare --server1=root@localhost --server2=root@otherhost \inventory:inventory -a --difftype=sql --changes-for=server1 \--show-reverse# server1 on localhost: ... connected.# server2 on localhost: ... connected.# Checking databases inventory on server1 and inventory on server2## WARNING: Objects in server1.inventory but not in server2.inventory:#         VIEW: finishing_up#         VIEW: cleaning#[...] # TABLE     supplier                                pass    FAIL    FAIL    ## Row counts are not the same among inventory.supplier and inventory.supplier.## Transformation for --changes-for=server1:## Data differences found among rows:UPDATE inventory.supplier SET name = 'Wesayso Corporation' WHERE code = '2';INSERT INTO inventory.supplier (code, name) VALUES('3', 'Never Enough Inc.');## Transformation for reverse changes (--changes-for=server2):## # Data differences found among rows:# UPDATE inventory.supplier SET name = 'Never Enough Inc.' WHERE code = '2';# DELETE FROM inventory.supplier WHERE code = '3';## Database consistency check failed.## ...done]]></description>
			<content:encoded><![CDATA[<span>The mysqldiff and mysqldbcompare utilities were designed to produce a difference report for objects and in the case of mysqldbcompare the data. Thus, you can compare two databases and produce a report of the differences in both object definitions and data rows.&nbsp;</span><br /><br /><span>While that may be very useful, would it not be much more useful to have the ability to produce SQL commands to transform databases?  Wait no longer! The latest release of MySQL Utilities has added the ability to generate SQL transformation statements by both the mysqldiff and mysqldbcompare utilities.&nbsp;</span><br /><br /><span>To generate SQL transformations in either utility, simply use the --sql option to tell the utility to produce the statements.</span><br /><br /><span><b>Object Transformations with mysqldiff</b></span><br /><br /><span>If you would like to compare the schema of two databases (the objects and their definitions), mysqldiff can do that for you and produce a difference report in a number of formats including CSV, TAB, GRID, and Vertical (like the mysql client’s \G option). </span><br /><br /><span>However, its greatest feature is the ability to generate transformation statements to alter the objects so that they conform. Best of all, mysqldiff works on all object types including the ability to recognize renames so you can get a true transformation path for all objects. For even greater flexibility, you can generate the difference in both directions. This means you can generate transformations for db1-to-db2 as well as db2-to-db1 in the same pass. Cool.</span><br /><br /><span>The following shows an example of running mysqldiff on two servers where some of the objects have diverged. It also shows how you can generate the reverse transformation statements.</span><br /><br /><span><br style="font-family: &quot;Courier New&quot;,Courier,monospace;" /></span><span><span>$ mysqldiff --server1=root@localhost --server2=root@otherhost \</span></span><br /><span><span>--changes-for=server1 --show-reverse util_test:util_test \</span></span><br /><span><span>--force --difftype=SQL</span></span><br /><span><span># server1 on localhost: ... connected.</span></span><br /><span><span># server2 on localhost: ... connected.</span></span><br /><span><span># WARNING: Objects in server1.util_test but not in server2.util_test:</span></span><br /><span><span># EVENT: e1</span></span><br /><span><span># Comparing util_test to util_test [PASS]</span></span><br /><span><span># Comparing util_test.f1 to util_test.f1 [PASS]</span></span><br /><span><span># Comparing util_test.p1 to util_test.p1 [PASS]</span></span><br /><span><span># Comparing util_test.t1 to util_test.t1 [PASS]</span></span><br /><span><span># Comparing util_test.t2 to util_test.t2 [PASS]</span></span><br /><span><span># Comparing util_test.t3 to util_test.t3 [FAIL]</span></span><br /><span><span># Transformation for --changes-for=server1:</span></span><br /><span><span>#</span></span><br /><span><span>ALTER TABLE util_test.t3 </span></span><br /><span><span>DROP COLUMN b, </span></span><br /><span><span>ADD COLUMN d char(30) NULL AFTER a </span></span><br /><span><span>ENGINE=MyISAM;</span></span><br /><span><span>#</span></span><br /><span><span># Transformation for reverse changes (--changes-for=server2):</span></span><br /><span><span>#</span></span><br /><span><span># ALTER TABLE util_test.t3 </span></span><br /><span><span># DROP COLUMN d, </span></span><br /><span><span># ADD COLUMN b char(30) NULL AFTER a, </span></span><br /><span><span># ENGINE=InnoDB;</span></span><br /><span><span>#</span></span><br /><span><span># Comparing util_test.trg to util_test.trg [FAIL]</span></span><br /><span><span># Transformation for --changes-for=server1:</span></span><br /><span><span>#</span></span><br /><span><span>DROP TRIGGER IF EXISTS `util_test`.`trg`;</span></span><br /><span><span>CREATE DEFINER=root@localhost TRIGGER util_test.trg BEFORE UPDATE ON util_test.t1 </span></span><br /><span><span>FOR EACH ROW INSERT INTO util_test.t1 VALUES('Wax on, wax off');</span></span><br /><span><span>#</span></span><br /><span><span># Transformation for reverse changes (--changes-for=server2):</span></span><br /><span><span>#</span></span><br /><span><span># DROP TRIGGER IF EXISTS `util_test`.`trg`;</span></span><br /><span><span># CREATE DEFINER=root@localhost TRIGGER util_test.trg AFTER INSERT ON util_test.t1 </span></span><br /><span><span># FOR EACH ROW INSERT INTO util_test.t2 VALUES('Test objects count');</span></span><br /><span><span>#</span></span><br /><span><span># Comparing util_test.v1 to util_test.v1 [FAIL]</span></span><br /><span><span># Transformation for --changes-for=server1:</span></span><br /><span><span>#</span></span><br /><span><span>ALTER VIEW util_test.v1 AS </span></span><br /><span><span>select `util_test`.`t2`.`a` AS `a` from `util_test`.`t2`;</span></span><br /><span><span>#</span></span><br /><span><span># Transformation for reverse changes (--changes-for=server2):</span></span><br /><span><span>#</span></span><br /><span><span># ALTER VIEW util_test.v1 AS </span></span><br /><span><span># select `util_test`.`t1`.`a` AS `a` from `util_test`.`t1`;</span></span><br /><span><span>#</span></span><br /><span><span>Compare failed. One or more differences found.</span></span><br /><br /><span><b>Generating Data Transformation with mysqldbcompare</b></span><br /><br /><span>The mysqldbcompare utility provides all of the object difference functionality included in mysqldiff along with the ability to generate transformation SQL statements for data. This means you can make sure your test or development databases are similar to your production databases or perhaps even your offline, read only databases match your online databases. Like mysqldiff, you can also get the reverse transformations at the same time. Very cool, eh?</span><br /><br /><span>The following shows an example of running mysqldbcompare to generate differences in data.</span><br /><br /><div><span>$ mysqldbcompare --server1=root@localhost --server2=root@otherhost \</span></div><div><span>inventory:inventory -a --difftype=sql --changes-for=server1 \</span></div><div><span>--show-reverse</span></div><div><span># server1 on localhost: ... connected.</span></div><div><span># server2 on localhost: ... connected.</span></div><div><span># Checking databases inventory on server1 and inventory on server2</span></div><div><span>#</span></div><div><span># WARNING: Objects in server1.inventory but not in server2.inventory:</span></div><div><span>#         VIEW: finishing_up</span></div><div><span>#         VIEW: cleaning</span></div><div><span>#</span></div><div><span><br /></span></div><div><span>[...] </span></div><div><span><br /></span></div><div></div><div><span></span><span># TABLE     supplier                                pass    FAIL    FAIL    </span></div><div><span>#</span></div><div><span># Row counts are not the same among inventory.supplier and inventory.supplier.</span></div><div><span>#</span></div><div><span># Transformation for --changes-for=server1:</span></div><div><span>#</span></div><div><span># Data differences found among rows:</span></div><div><span>UPDATE inventory.supplier SET name = 'Wesayso Corporation' WHERE code = '2';</span></div><div><span>INSERT INTO inventory.supplier (code, name) VALUES('3', 'Never Enough Inc.');</span></div><div><span>#</span></div><div><span># Transformation for reverse changes (--changes-for=server2):</span></div><div><span>#</span></div><div><span># # Data differences found among rows:</span></div><div><span># UPDATE inventory.supplier SET name = 'Never Enough Inc.' WHERE code = '2';</span></div><div><span># DELETE FROM inventory.supplier WHERE code = '3';</span></div><div><span>#</span></div><div><span># Database consistency check failed.</span></div><div><span>#</span></div><div><span># ...done</span></div><div><img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/2959317805805542041-3973032454519382820?l=drcharlesbell.blogspot.com" alt="" /></div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=33172&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=33172&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/05/10/compare-and-synchronize-databases-with-mysql-utilities/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Utilities Frequently Asked Questions</title>
		<link>http://drcharlesbell.blogspot.com/2012/05/mysql-utilities-frequently-asked.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mysql-utilities-frequently-asked-questions</link>
		<comments>http://drcharlesbell.blogspot.com/2012/05/mysql-utilities-frequently-asked.html#comments</comments>
		<pubDate>Wed, 09 May 2012 20:13:32 +0000</pubDate>
		<dc:creator>Chuck Bell</dc:creator>
				<category><![CDATA[administration]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[workbench]]></category>

		<guid isPermaLink="false">http://planetmysql.ru/?guid=ae8b1b577ccde9021d3aee106ca1d1db</guid>
		<description><![CDATA[Momentum for MySQL Utilities continues to build.  I hosted a webinar recently about MySQL Utilities (available on-demand from the link below), which generated a lot of interest and some good questions. http://event.on24.com/eventRegistration/EventLobbyServlet?target=lobby.jsp&#38;eventid=448952&#38;sessionid=1&#38;key=7E741ED049DFBF49D10C90A2B62E410F&#38;eventuserid=63530507With so many questions and ideas coming in I decided to create a blog of FAQs. I plan to add these to the MySQL documentation as well.  Keep your ideas and questions coming!I hope you find these questions enlightening. I have grouped them for easier reading. You can find the MySQL Utilities documentation using the link below. http://dev.mysql.com/doc/workbench/en/mysql-utilities.htmlGeneralAre these utilities present in the community version of MySQL?They are included in the community edition of the MySQL Workbench product, which can be downloaded from the following link. http://www.mysql.com/downloads/workbench/Should/can we run this on live data?Yes. Naturally, you would want to test some operations before jumping directly into a production environment. For example, you may want to test any database migration, transformation, or similar massive change in a test environment. Can we use the utilities in a production environment under the GPL license?Yes. MySQL Utilities is part of MySQL Workbench so all such licenses apply accordingly.Storage EnginesCan the utilities be used with MyISAM or CSV?Yes. There are no storage engine specific limitations in using the utilities. There are some features written specifically for InnoDB so those may not apply but in general no utility is storage engine specific. For example, the mysqldiskusage utility shows exact sizes for MyISAM and InnoDB files but uses estimated sizes for any other storage engine based on number of rows and row size.PlatformsCan I use MySQL Utilities on Linux?Yes. MySQL Utilities runs on all platforms supported by MySQL Workbench.Can the utilities be used on Windows?Yes!Do the utilities work both for window-based and linux-based servers?Yes! They work for any server hosting MySQL.InstallationDo we have to install the utilities with rpm or can we use the tar ball extract and run from there?MySQL Utilities is installed as part of MySQL Workbench. You can download and install Workbench using several platform-specific installers. You can also branch and download MySQL Utilities from Launchpad. You can also build and install it from the source code you’ve downloaded using typical Python install steps (python ./setup.py install). https://launchpad.net/mysql-utilitiesWhat's the link to download these utilities?MySQL Utilities is part of MySQL Workbench. You can download MySQL Workbench from the following link.http://www.mysql.com/downloads/workbench/LockingDo the utilities lock tables while running?Yes, but only for situations that require locks. The mysqldbexport utility also allows you to specify what type of lock to use: no-locks = do not use any table lockslock-all = use table locks but no transaction and no consistent readsnaphot (default) = consistent read using a single transaction.Are there any utilities that can show DB locks (like which query is blocking which one)?No, not currently but that is an excellent suggestion!mysqldbcompareHow fast is mysqldbcompare? Say a table with 10 million rows?It is difficult to predict a precise estimate of run time based on number of rows. However, it is generally such that the more rows there are the longer the utility will run. The mysqldbcompare utility is used to produce a difference of two databases. It creates a difference between objects of the same name for either object definitions, data, or both. When comparing object definitions, the performance is very fast because there isn’t a lot of processing involved. When comparing data, the utility uses an algorithm to create checksums for each row in the table. During this phase, the tables are locked. Once that stage is done, the tables are unlocked and the algorithm begins to compact the checksums into chunks, which are later compared between the servers. If the checksums differ, the chunks are expanded and the differences calculated. Thus, for tables containing millions of rows the utility will take some time to complete. The best time to run this utility is during low usage periods such as times reserved for upgrades, backups, and similar operations.How will running mysqldbcompare effect a production database?If generating a difference for data, the utility will lock the tables long enough to calculate a checksum for each row. Depending on the number of rows this could be for a long time and in those cases you should run mysqldbcompare during low usage periods. The utility will use a consistent read to lock InnoDB tables but will issue table locks for non-InnoDB tables.Will mysqldbcompare cause table locking on MyISAM table?Yes. A table lock is issued during checksum creation.What is the load going to be on the servers when mysqldbcompare runs?The load on the server itself is minimal. There is moderate CPU usage during checksum creation but nothing that should cause a problem. The longest period of activity is when the table scans are executed for creating a checksum for each row.mysqldbexportIs mysqldbexport similar to mysqldump?Yes, the mysqldbexport is designed to export data in a row-by-row or logical fashion. However, you can export data in CSV, TAB, Vertical formats as well as SQL statements using CREATE TABLE, INSERT, etc. making mysqldbexport more versatile than mysqldump. You would use mysqldbexport in situations where you need special machine or human readable output for operations like transforming the data or examining the structures in more detail – especially if you need a format other than SQL statements.Replication UtilitiesAre the high availability features available for version 5.5 or 5.6?The general replication utilities such as mysqlrplcheck and mysqlreplicate will work with servers version 5.0 and later. The newest high availability feature, failover, in mysqlrpladmin and mysqlfailover work only for servers that support global transaction identifiers (GTIDs) which were added in version 5.6.5. You can discover more about GTIDs from the following blog by Luis Soares.http://d2-systems.blogspot.co.uk/2012/04/global-transaction-identifiers-are-in.htmlWhere do I get more info about mysqlrpladmin?The online MySQL Workbench Manual has information about each utility. You can also use the --help option to show all options and their descriptions.http://dev.mysql.com/doc/workbench/en/mysql-utilities.htmlHow can I use the utilities to test replication on a single host?You can use mysqlserverclone to clone an existing, running instance of MySQL or clone from an installation (basedir), then mysqlreplicate to create the replication topology. Is the replication failover feature only for version 5.6? Yes. It requires support for global transaction identifiers, which were added in version 5.6.5. A developer milestone release of 5.6 is available for download.http://dev.mysql.com/downloads/mysql/#downloads(Select the Development Releases tab)What features of mysqlrpladmin will work on version 5.5?All of the features except slave election and failover.Do you need to create a replication user on the slave site other than the master?The mysqlreplicate utility provides an option to use a specific user on the master for replication or it will create a user by default. You can also request that a new user be created during the operation.]]></description>
			<content:encoded><![CDATA[<p>Momentum for MySQL Utilities continues to build.  I hosted a webinar recently about MySQL Utilities (available on-demand from the link below), which generated a lot of interest and some good questions. </p><p><a href="http://event.on24.com/eventRegistration/EventLobbyServlet?>http://event.on24.com/eventRegistration/EventLobbyServlet?target=lobby.jsp&eventid=448952&sessionid=1&key=7E741ED049DFBF49D10C90A2B62E410F&eventuserid=63530507</a></p><p>With so many questions and ideas coming in I decided to create a blog of FAQs. I plan to add these to the MySQL documentation as well.  Keep your ideas and questions coming!</p><p>I hope you find these questions enlightening. I have grouped them for easier reading. You can find the MySQL Utilities documentation using the link below. </p><p><a href="http://dev.mysql.com/doc/workbench/en/mysql-utilities.html">http://dev.mysql.com/doc/workbench/en/mysql-utilities.html</a></p><p><strong>General</strong></p><p><em>Are these utilities present in the community version of MySQL?</em></p><p>They are included in the community edition of the MySQL Workbench product, which can be downloaded from the following link. </p><p><a href="http://www.mysql.com/downloads/workbench/">http://www.mysql.com/downloads/workbench/</a></p><p><em>Should/can we run this on live data?</em></p><p>Yes. Naturally, you would want to test some operations before jumping directly into a production environment. For example, you may want to test any database migration, transformation, or similar massive change in a test environment. </p><p><em>Can we use the utilities in a production environment under the GPL license?</em></p><p>Yes. MySQL Utilities is part of MySQL Workbench so all such licenses apply accordingly.</p><p><strong>Storage Engines</strong></p><p><em>Can the utilities be used with MyISAM or CSV?</em></p><p>Yes. There are no storage engine specific limitations in using the utilities. There are some features written specifically for InnoDB so those may not apply but in general no utility is storage engine specific. For example, the mysqldiskusage utility shows exact sizes for MyISAM and InnoDB files but uses estimated sizes for any other storage engine based on number of rows and row size.</p><p><strong>Platforms</strong></p><p><em>Can I use MySQL Utilities on Linux?</em></p><p>Yes. MySQL Utilities runs on all platforms supported by MySQL Workbench.</p><p><em>Can the utilities be used on Windows?</em></p><p>Yes!</p><p><em>Do the utilities work both for window-based and linux-based servers?</em></p><p>Yes! They work for any server hosting MySQL.</p><p><strong>Installation</strong></p><p><em>Do we have to install the utilities with rpm or can we use the tar ball extract and run from there?</em></p><p>MySQL Utilities is installed as part of MySQL Workbench. You can download and install Workbench using several platform-specific installers. </p><p>You can also branch and download MySQL Utilities from Launchpad. You can also build and install it from the source code you’ve downloaded using typical Python install steps (python ./setup.py install). </p><p><a href="https://launchpad.net/mysql-utilities">https://launchpad.net/mysql-utilities</a></p><p><em>What's the link to download these utilities?</em></p><p>MySQL Utilities is part of MySQL Workbench. You can download MySQL Workbench from the following link.</p><p><a href="http://www.mysql.com/downloads/workbench/">http://www.mysql.com/downloads/workbench/</a></p><p><strong>Locking</strong></p><p><em>Do the utilities lock tables while running?</em></p><p>Yes, but only for situations that require locks. The mysqldbexport utility also allows you to specify what type of lock to use: </p><p>no-locks = do not use any table locks</p><p>lock-all = use table locks but no transaction and no consistent read</p><p>snaphot (default) = consistent read using a single transaction.</p><p><em>Are there any utilities that can show DB locks (like which query is blocking which one)?</em></p><p>No, not currently but that is an excellent suggestion!</p><p><strong>mysqldbcompare</strong></p><p><em>How fast is mysqldbcompare? Say a table with 10 million rows?</em></p><p>It is difficult to predict a precise estimate of run time based on number of rows. However, it is generally such that the more rows there are the longer the utility will run. The mysqldbcompare utility is used to produce a difference of two databases. It creates a difference between objects of the same name for either object definitions, data, or both. When comparing object definitions, the performance is very fast because there isn’t a lot of processing involved. When comparing data, the utility uses an algorithm to create checksums for each row in the table. During this phase, the tables are locked. Once that stage is done, the tables are unlocked and the algorithm begins to compact the checksums into chunks, which are later compared between the servers. If the checksums differ, the chunks are expanded and the differences calculated. Thus, for tables containing millions of rows the utility will take some time to complete. The best time to run this utility is during low usage periods such as times reserved for upgrades, backups, and similar operations.</p><p><em>How will running mysqldbcompare effect a production database?</em></p><p>If generating a difference for data, the utility will lock the tables long enough to calculate a checksum for each row. Depending on the number of rows this could be for a long time and in those cases you should run mysqldbcompare during low usage periods. The utility will use a consistent read to lock InnoDB tables but will issue table locks for non-InnoDB tables.</p><p><em>Will mysqldbcompare cause table locking on MyISAM table?</em></p><p>Yes. A table lock is issued during checksum creation.</p><p><em>What is the load going to be on the servers when mysqldbcompare runs?</em></p><p>The load on the server itself is minimal. There is moderate CPU usage during checksum creation but nothing that should cause a problem. The longest period of activity is when the table scans are executed for creating a checksum for each row.</p><p><strong>mysqldbexport</strong></p><p><em>Is mysqldbexport similar to mysqldump?</em></p><p>Yes, the mysqldbexport is designed to export data in a row-by-row or logical fashion. However, you can export data in CSV, TAB, Vertical formats as well as SQL statements using CREATE TABLE, INSERT, etc. making mysqldbexport more versatile than mysqldump. You would use mysqldbexport in situations where you need special machine or human readable output for operations like transforming the data or examining the structures in more detail – especially if you need a format other than SQL statements.</p><p><strong>Replication Utilities</strong></p><p><em>Are the high availability features available for version 5.5 or 5.6?</em></p><p>The general replication utilities such as mysqlrplcheck and mysqlreplicate will work with servers version 5.0 and later. The newest high availability feature, failover, in mysqlrpladmin and mysqlfailover work only for servers that support global transaction identifiers (GTIDs) which were added in version 5.6.5. </p><p>You can discover more about GTIDs from the following blog by Luis Soares.</p><p><a href="http://d2-systems.blogspot.co.uk/2012/04/global-transaction-identifiers-are-in.html">http://d2-systems.blogspot.co.uk/2012/04/global-transaction-identifiers-are-in.html</a></p><p><em>Where do I get more info about mysqlrpladmin?</em></p><p>The online MySQL Workbench Manual has information about each utility. You can also use the --help option to show all options and their descriptions.</p><p><a href="http://dev.mysql.com/doc/workbench/en/mysql-utilities.html">http://dev.mysql.com/doc/workbench/en/mysql-utilities.html</a></p><p><em>How can I use the utilities to test replication on a single host?</em></p><p>You can use mysqlserverclone to clone an existing, running instance of MySQL or clone from an installation (basedir), then mysqlreplicate to create the replication topology. </p><p><em>Is the replication failover feature only for version 5.6? </em></p><p>Yes. It requires support for global transaction identifiers, which were added in version 5.6.5. A developer milestone release of 5.6 is available for download.</p><p><a href="http://dev.mysql.com/downloads/mysql/#downloads">http://dev.mysql.com/downloads/mysql/#downloads</a></p><p>(Select the Development Releases tab)</p><p><em>What features of mysqlrpladmin will work on version 5.5?</em></p><p>All of the features except slave election and failover.</p><p><em>Do you need to create a replication user on the slave site other than the master?</em></p><p>The mysqlreplicate utility provides an option to use a specific user on the master for replication or it will create a user by default. You can also request that a new user be created during the operation.</p><div><img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/2959317805805542041-8307641094060823604?l=drcharlesbell.blogspot.com" alt="" /></div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=33171&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=33171&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/05/10/mysql-utilities-frequently-asked-questions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>common_schema rev. 218: QueryScript, throttling, processes, documentation</title>
		<link>http://code.openark.org/blog/mysql/common_schema-rev-218-queryscript-throttling-processes-documentation?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=common_schema-rev-218-queryscript-throttling-processes-documentation</link>
		<comments>http://code.openark.org/blog/mysql/common_schema-rev-218-queryscript-throttling-processes-documentation#comments</comments>
		<pubDate>Wed, 08 Feb 2012 09:53:30 +0000</pubDate>
		<dc:creator>Shlomi Noach</dc:creator>
				<category><![CDATA[administration]]></category>
		<category><![CDATA[common_schema]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[QueryScript]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://code.openark.org/blog/?p=4526</guid>
		<description><![CDATA[common_schema, revision 218 is released, with major new features, top one being server side scripting. Here are the highlights:

QueryScript: server side scripting is now supported by common_schema, which acts as an interpreter for QueryScript code.
Throttling for queries is now made available via the throttle() function.
Enhancements to processlist-related views, including the new slave_hosts view.
Inline documentation/help is available via the help() routine.
more...

QueryScript
common_schema makes for a QueryScript implementation for MySQL. You can run server side scripts, interpreted by common_schema, which allow for easy syntax and greater power than was otherwise previously available on the MySQL server. For example:

foreach($table, $schema, $engine: table like '%')
  if ($engine = 'ndbcluster')
    ALTER ONLINE TABLE :$schema.:$table REORGANIZE PARTITION;

QueryScript includes flow control, conditional branching, variables &#38; variable expansion, script throttling and more.
Read more on common_schema's QueryScript implementation.
Query throttling
Throttling for MySQL queries was suggested by means of elaborate query manipulation. It is now reduced into a single throttle function: one can now just invoke throttle(3) on one's query, so as to make the query execute for a longer time, while taking short sleep breaks during operation, easing up the query's demand for resources.
Read more on query throttling.
Process views
The processlist_grantees view provides with more details on the running processes. slave_hosts is a new view, listing hostnames of connected slaves.
Read more on process views.
help()
The common_schema documentation is now composed of well over 100 pages, including synopsis, detailed internals discussion, notes and examples. I can't exaggerate in saying that the documentation took the vast majority of time for this code to release.
The documentation is now made available inline, from within you mysql client, via the help() routine. Want to know more about redundant (duplicate) keys and how to find them? Just type:

call help('redundant');

and see what comes out!
The entire documentation, which is available online as well as a downloadable bundle, is embedded into common_schema itself. It's rather cool.
Tests
common_schema is tested. The number of tests in common_schema is rapidly growing, and new tests are introduced for new features as well as for older ones. There is not yet full coverage for all views, but I'm working hard at it. common_schema is a robust piece of code!
Get it!
Download common_schema on the common_schema project page.
Read the documentation online, or download it as well (or call for help())
common_schema is released under the BSD license.]]></description>
			<content:encoded><![CDATA[<p><a href="http://code.google.com/p/common-schema/">common_schema</a>, revision <strong>218</strong> is released, with major new features, top one being <em>server side scripting</em>. Here are the highlights:</p>
<ul>
<li><a href="http://www.queryscript.com/"><strong>QueryScript</strong></a>: server side scripting is now supported by <em>common_schema</em>, which acts as an interpreter for QueryScript code.</li>
<li>Throttling for queries is now made available via the <strong>throttle()</strong> function.</li>
<li>Enhancements to processlist-related views, including the new <strong>slave_hosts</strong> view.</li>
<li>Inline documentation/help is available via the <strong>help()</strong> routine.</li>
<li>more...</li>
</ul>
<h4>QueryScript</h4>
<p><em>common_schema</em> makes for a QueryScript implementation for MySQL. You can run server side scripts, interpreted by <em>common_schema</em>, which allow for easy syntax and greater power than was otherwise previously available on the MySQL server. For example:</p>
<blockquote>
<pre>foreach($table, $schema, $engine: table like '%')
  if ($engine = 'ndbcluster')
    ALTER ONLINE TABLE :$schema.:$table REORGANIZE PARTITION;</pre>
</blockquote>
<p>QueryScript includes flow control, conditional branching, variables &amp; variable expansion, script throttling and more.</p>
<p>Read more on <a href="http://common-schema.googlecode.com/svn/trunk/common_schema/doc/html/query_script.html">common_schema's QueryScript implementation</a>.</p>
<h4><span></span>Query throttling</h4>
<p><a href="http://code.openark.org/blog/mysql/self-throttling-mysql-queries">Throttling for MySQL queries</a> was suggested by means of elaborate query manipulation. It is now reduced into a single throttle function: one can now just invoke <strong>throttle(3)</strong> on one's query, so as to make the query execute for a <em>longer</em> time, while taking short sleep breaks during operation, easing up the query's demand for resources.</p>
<p>Read more on <a href="http://common-schema.googlecode.com/svn/trunk/common_schema/doc/html/throttle.html">query throttling</a>.</p>
<h4>Process views</h4>
<p>The <strong>processlist_grantees</strong> view provides with more details on the running processes. <strong>slave_hosts</strong> is a new view, listing hostnames of connected slaves.</p>
<p>Read more on <a href="http://common-schema.googlecode.com/svn/trunk/common_schema/doc/html/process_views.html">process views</a>.</p>
<h4>help()</h4>
<p>The <em>common_schema</em> documentation is now composed of well over <strong>100</strong> pages, including synopsis, detailed internals discussion, notes and examples. I can't exaggerate in saying that the documentation took the vast majority of time for this code to release.</p>
<p>The documentation is now made available inline, from within you mysql client, via the <a href="http://common-schema.googlecode.com/svn/trunk/common_schema/doc/html/help.html"><strong>help()</strong></a> routine. Want to know more about redundant (duplicate) keys and how to find them? Just type:</p>
<blockquote>
<pre>call help('redundant');</pre>
</blockquote>
<p>and see what comes out!</p>
<p>The entire <a href="http://common-schema.googlecode.com/svn/trunk/common_schema/doc/html/introduction.html">documentation</a>, which is available online as well as a downloadable bundle, is embedded into <em>common_schema</em> itself. It's rather cool.</p>
<h4>Tests</h4>
<p><em>common_schema</em> is tested. The number of tests in <em>common_schema</em> is rapidly growing, and new tests are introduced for new features as well as for older ones. There is not yet full coverage for all views, but I'm working hard at it. <em>common_schema</em> is a robust piece of code!</p>
<h4>Get it!</h4>
<p>Download <em>common_schema</em> on the <a href="http://code.google.com/p/common-schema">common_schema project page</a>.</p>
<p>Read the documentation <a href="http://common-schema.googlecode.com/svn/trunk/common_schema/doc/html/introduction.html">online</a>, or download it as well (or call for <strong>help()</strong>)</p>
<p><em>common_schema</em> is released under the BSD license.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31946&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31946&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/02/08/common_schema-rev-218-queryscript-throttling-processes-documentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>QueryScript: SQL scripting language</title>
		<link>http://code.openark.org/blog/mysql/queryscript-sql-scripting-language?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=queryscript-sql-scripting-language</link>
		<comments>http://code.openark.org/blog/mysql/queryscript-sql-scripting-language#comments</comments>
		<pubDate>Wed, 08 Feb 2012 09:43:19 +0000</pubDate>
		<dc:creator>Shlomi Noach</dc:creator>
				<category><![CDATA[administration]]></category>
		<category><![CDATA[common_schema]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[QueryScript]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://code.openark.org/blog/?p=4596</guid>
		<description><![CDATA[Introducing QueryScript: a programming language aimed for SQL scripting, seamlessly combining scripting power such as flow control &#38; variables with standard SQL statements or RDBMS-specific commands.
QueryScript is available fro MySQL via common_schema, which adds MySQL-specific usage.
What does QueryScript look like? Here are a few code samples:
Turn a bulk DELETE operation into smaller tasks. Throttle in between.

while (DELETE FROM archive.events WHERE ts &#60; CURDATE() LIMIT 1000)
{
  throttle 2;
}

Convert all InnoDB tables in the 'sakila' database to compressed format:

foreach ($table, $schema, $engine: table in sakila)
{
  if ($engine = 'InnoDB')
    ALTER TABLE :$schema.:$table ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
}

Shard your data across multiple schemata:

foreach($shard: {USA, GBR, JAP, FRA})
{
  CREATE DATABASE db_:$shard;
  CREATE TABLE db_:$shard.city LIKE world.City;
  INSERT INTO db_:$shard.city SELECT * FROM world.City WHERE CountryCode = $shard;
}

This tight integration between script and SQL, with the power of iteration, conditional statements, variables, variable expansion, throttling etc., makes QueryScript a power tool, with capabilities superseding those of stored routines, and allowing for simplified, dynamic code.
QueryScript code is interpreted. It's just a text, so it can be read from a @user_defined_variable, a table column, text file, what have you. For example:

mysql&#62; set @script := "while (TIME(SYSDATE()) &#60; '17:00:00') SELECT * FROM world.City WHERE id = 1 + FLOOR((RAND()*4079));";
mysql&#62; call run(@script);

For more details, consult the QueryScript site.
If you're a MySQL user/DBA, better read the common_schema QueryScript documentation, to better understand the specific common_schema implementation and enhanced features.
common_schema, including the QueryScript interpreter, can be downloaded from the common_schema project page.]]></description>
			<content:encoded><![CDATA[<p>Introducing <strong><a href="http://www.queryscript.com/">QueryScript</a></strong>: a programming language aimed for SQL scripting, seamlessly combining scripting power such as flow control &amp; variables with standard SQL statements or RDBMS-specific commands.</p>
<p>QueryScript is available fro MySQL via <a href="http://code.google.com/p/common-schema">common_schema</a>, which adds MySQL-specific usage.</p>
<p><em>What does QueryScript look like?</em> Here are a few code samples:</p>
<p>Turn a bulk DELETE operation into smaller tasks. Throttle in between.</p>
<blockquote>
<pre>while (DELETE FROM archive.events WHERE ts &lt; CURDATE() LIMIT 1000)
{
  throttle 2;
}</pre>
</blockquote>
<p>Convert all InnoDB tables in the 'sakila' database to compressed format:</p>
<blockquote>
<pre>foreach ($table, $schema, $engine: table in sakila)
{
  if ($engine = 'InnoDB')
    ALTER TABLE :$schema.:$table ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
}</pre>
</blockquote>
<p>Shard your data across multiple schemata:</p>
<blockquote>
<pre>foreach($shard: {USA, GBR, JAP, FRA})
{
  CREATE DATABASE db_:$shard;
  CREATE TABLE db_:$shard.city LIKE world.City;
  INSERT INTO db_:$shard.city SELECT * FROM world.City WHERE CountryCode = $shard;
}</pre>
</blockquote>
<p><span></span>This tight integration between script and SQL, with the power of iteration, conditional statements, variables, variable expansion, throttling etc., makes QueryScript a power tool, with capabilities superseding those of stored routines, and allowing for simplified, dynamic code.</p>
<p>QueryScript code is interpreted. It's just a text, so it can be read from a @user_defined_variable, a table column, text file, what have you. For example:</p>
<blockquote>
<pre>mysql&gt; <strong>set</strong> @script := "while (TIME(SYSDATE()) &lt; '17:00:00') SELECT * FROM world.City WHERE id = 1 + FLOOR((RAND()*4079));";
mysql&gt; <strong>call</strong> run(@script);</pre>
</blockquote>
<p>For more details, consult the <strong><a href="http://www.queryscript.com/">QueryScript</a></strong> site.</p>
<p>If you're a MySQL user/DBA, better read the <a href="http://common-schema.googlecode.com/svn/trunk/common_schema/doc/html/query_script.html"><strong>common_schema QueryScript documentation</strong></a>, to better understand the specific <em>common_schema</em> implementation and enhanced features.</p>
<p><em>common_schema</em>, including the QueryScript interpreter, can be downloaded from the <a href="http://code.google.com/p/common-schema">common_schema project page</a>.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31947&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31947&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/02/08/queryscript-sql-scripting-language/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Join us at the OTN Sys Admin Day for Oracle Linux and Solaris on Sep. 22nd, Seattle (WA)</title>
		<link>http://www.lenzg.net/archives/347-Join-us-at-the-OTN-Sys-Admin-Day-for-Oracle-Linux-and-Solaris-on-Sep.-22nd,-Seattle-WA.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=join-us-at-the-otn-sys-admin-day-for-oracle-linux-and-solaris-on-sep-22nd-seattle-wa</link>
		<comments>http://www.lenzg.net/archives/347-Join-us-at-the-OTN-Sys-Admin-Day-for-Oracle-Linux-and-Solaris-on-Sep.-22nd,-Seattle-WA.html#comments</comments>
		<pubDate>Wed, 14 Sep 2011 20:39:38 +0000</pubDate>
		<dc:creator>Lenz Grimmer</dc:creator>
				<category><![CDATA[administration]]></category>
		<category><![CDATA[event]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[lvm]]></category>
		<category><![CDATA[meeting]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[seminar]]></category>
		<category><![CDATA[solaris]]></category>

		<guid isPermaLink="false">http://www.lenzg.net/archives/347-guid.html</guid>
		<description><![CDATA[Last week we concluded our first Oracle Technology Network Sys Admin Day in Sacramento (CA). Well, it was actually the second Sys Admin Day, but the first one that had two parallel tracks of sessions about both Oracle Linux and Oracle Solaris.
I helped preparing for the event by creating the Linux lab handbook as well as the VirtualBox appliance of Oracle Linux 6.1 that was used for the exercises. Unfortunately I could not be there in person, but it would have been pointless for me to go on an intercontinental flight just for one day.
From the feedback we've received so far, the attendees really enjoyed the event and were positively surprised about the depth and quality of the practical hands-on lab sessions.
If you've missed the first one and happen to live somewhere in the Seattle area, you have another chance to attend OTN sysadmin day: we'll be hosting another one on Thursday, September 22nd at The Westin Seattle (1900 5th Ave., Seattle, WA 98101). Again, attendance is free, all you need to bring is your own laptop with VirtualBox installed. We'll provide the rest. Space is limited &#8212; you can review the agenda and register here!]]></description>
			<content:encoded><![CDATA[<p>Last week we concluded our first <a href="http://www.oracle.com/technetwork/">Oracle Technology Network</a> Sys Admin Day in Sacramento (CA). Well, it was actually the second Sys Admin Day, but the first one that had two parallel tracks of sessions about both <a href="http://oracle.com/linux">Oracle Linux</a> and <a href="http://oracle.com/">Oracle Solaris</a>.</p>
<p>I helped preparing for the event by creating the Linux lab handbook as well as the VirtualBox appliance of Oracle Linux 6.1 that was used for the exercises. Unfortunately I could not be there in person, but it would have been pointless for me to go on an intercontinental flight just for one day.</p>
<p>From the feedback we've received so far, the attendees really enjoyed the event and were positively surprised about the depth and quality of the practical hands-on lab sessions.</p>
<p>If you've missed the first one and happen to live somewhere in the Seattle area, you have another chance to attend OTN sysadmin day: we'll be hosting another one on <strong>Thursday, September 22nd at The Westin Seattle</strong> (1900 5th Ave., Seattle, WA 98101). Again, attendance is free, all you need to bring is your own laptop with VirtualBox installed. We'll provide the rest. Space is limited &mdash; you can review the agenda and <a href="http://bit.ly/oiaox0">register here</a>!</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=29992&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=29992&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2011/09/15/join-us-at-the-otn-sys-admin-day-for-oracle-linux-and-solaris-on-sep-22nd-seattle-wa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Workbench, Windows XP and SSH public key auth.</title>
		<link>http://wb.mysql.com/?p=1102&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mysql-workbench-windows-xp-and-ssh-public-key-auth</link>
		<comments>http://wb.mysql.com/?p=1102#comments</comments>
		<pubDate>Tue, 19 Jul 2011 17:46:36 +0000</pubDate>
		<dc:creator>The Workbench Team</dc:creator>
				<category><![CDATA[administration]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://wb.mysql.com/?p=1102</guid>
		<description><![CDATA[It happens that sometimes you need to access a remote box which supports ssh key authentication. Recently I was trying to reproduce a bug related to SSH public key authentication, so here I would like to share some of my experience.
There will be no explanation of the public key authentication itself here, rather the actual setup and steps to have a public key auth for Windows(client) -&#62; Linux(server) working. Why Windows you would ask? Because interactions for Linux-&#62;Linux and for Mac OS X -&#62; Linux simply work using the Unix way, while for Windows you may need some extra actions to do.
&#160;
Setup
What I had at endpoints:
Linux &#8211; Ubuntu 11.04, sshd is set up to deny password auth.
Windows &#8211; well, it is an XP SP3 i386 box. MySQL Workbench 5.2.34+ is installed
First of all I created an encrypted pair of RSA keys, using Linux box&#8217;s ssh-keygen. After that the public key was added to ~/.ssh/authorized_keys and the private one was moved to the Windows box.
Naturally my first attempt was to simply specify path to the private key file in the server settings, just as I would do in Linux or OS X.
&#160;
Remote management section
&#160;
That did not work, just as the bug report had said. Moving key to $HOME/.ssh/id_rsa did not help. Could that be that paramiko can not handle openssh keys on Windows, or openssh&#8217;s encryption method?
&#160;
Error message on connect via SSH public keys
&#160;
Bazaar has similar issues on Windows, the solution they suggest is to either put keys into .ssh dir, or use pageant tool from PuTTY.  I tried .ssh, that did not work. So the latter way turned into conversion of the openssh private key into PuTTY ppk format. The conversion is done using PuTTYgen, then the key is loaded in the pageant. More details are given in the mentioned bazaar guide Bzr and SSH.
And this worked! Let me sum up the steps:
 1. Generate keys, using either openssh on Linux, OSX, Cygwin, or using PuTTYgen;
2. Specify private ssh key in the appropriate section of the Workbench&#8217;s &#8220;Server Instance Editor&#8221;;
3. Add key to pageant tool.
4. At this moment passwords to unlock keys have to be entered both in MySQL Workbench and the pageant.
5. Use it&#8230;]]></description>
			<content:encoded><![CDATA[<p>It happens that sometimes you need to access a remote box which supports ssh key authentication. Recently I was trying to reproduce a bug related to SSH public key authentication, so here I would like to share some of my experience.</p>
<p>There will be no explanation of the public key authentication itself here, rather the actual setup and steps to have a public key auth for Windows(client) -&gt; Linux(server) working. Why Windows you would ask? Because interactions for Linux-&gt;Linux and for Mac OS X -&gt; Linux simply work using the Unix way, while for Windows you may need some extra actions to do.</p>
<p>&nbsp;</p>
<p><strong>Setup</strong></p>
<p>What I had at endpoints:</p>
<ul>Linux &#8211; <em>Ubuntu 11.04, sshd is set up to deny password auth.</em><br />
Windows &#8211; <em>well, it is an XP SP3 i386 box. MySQL Workbench 5.2.34+ is installed</em></ul>
<p>First of all I created an encrypted pair of RSA keys, using Linux box&#8217;s ssh-keygen. After that the public key was added to ~/.ssh/authorized_keys and the private one was moved to the Windows box.</p>
<p>Naturally my first attempt was to simply specify path to the private key file in the server settings, just as I would do in Linux or OS X.</p>
<p>&nbsp;</p>
<div><a rel="attachment wp-att-1104" href="http://wb.mysql.com/?attachment_id=1104"><img class="size-medium wp-image-1104" title="remote_management" src="http://wb.fabforce.eu/wp-content/uploads/rmt_mgmt-300x158.gif" alt="" width="300" height="158" /></a><p>Remote management section</p></div>
<p>&nbsp;</p>
<p>That did not work, just as the bug report had said. Moving key to $HOME/.ssh/id_rsa did not help. Could that be that paramiko can not handle openssh keys on Windows, or openssh&#8217;s encryption method?</p>
<p>&nbsp;</p>
<div><a rel="attachment wp-att-1110" href="http://wb.mysql.com/?attachment_id=1110"><img class="size-medium wp-image-1110" title="conn_error" src="http://wb.fabforce.eu/wp-content/uploads/conn_error2-300x128.gif" alt="" width="300" height="128" /></a><p>Error message on connect via SSH public keys</p></div>
<p>&nbsp;</p>
<p>Bazaar has similar issues on Windows, the solution they suggest is to either put keys into .ssh dir, or use pageant tool from PuTTY.  I tried .ssh, that did not work. So the latter way turned into conversion of the openssh private key into PuTTY ppk format. The conversion is done using PuTTYgen, then the key is loaded in the pageant. More details are given in the mentioned bazaar guide <a href="http://wiki.bazaar.canonical.com/Bzr_and_SSH">Bzr and SSH</a>.</p>
<p>And this worked! Let me sum up the steps:</p>
<ul> 1. Generate keys, using either openssh on Linux, OSX, Cygwin, or using PuTTYgen;<br />
2. Specify private ssh key in the appropriate section of the Workbench&#8217;s &#8220;Server Instance Editor&#8221;;<br />
3. Add key to pageant tool.<br />
4. At this moment passwords to unlock keys have to be entered both in MySQL Workbench and the pageant.<br />
5. Use it&#8230;</ul><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=29414&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=29414&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2011/07/19/mysql-workbench-windows-xp-and-ssh-public-key-auth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speaking at the O&#8217;Reilly MySQL Conference &amp; Expo: &quot;A  look into a MySQL DBA&#8217;s toolchest&quot;</title>
		<link>http://www.lenzg.net/archives/293-Speaking-at-the-OReilly-MySQL-Conference-Expo-A-look-into-a-MySQL-DBAs-toolchest.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=speaking-at-the-oreilly-mysql-conference-expo-a-look-into-a-mysql-dbas-toolchest</link>
		<comments>http://www.lenzg.net/archives/293-Speaking-at-the-OReilly-MySQL-Conference-Expo-A-look-into-a-MySQL-DBAs-toolchest.html#comments</comments>
		<pubDate>Tue, 09 Mar 2010 10:38:27 +0000</pubDate>
		<dc:creator>Lenz Grimmer</dc:creator>
				<category><![CDATA[administration]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[event]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[OSS]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[utility]]></category>

		<guid isPermaLink="false">http://www.lenzg.net/archives/293-guid.html</guid>
		<description><![CDATA[
I'm happy to announce that my talk &#34;Making MySQL administration a breeze - a look into a MySQL DBA's toolchest&#34; has been accepted for this year's edition of the MySQL Conference &#38; Expo in Santa Clara, which will take place on April 12-15, 2010. The session is currently scheduled for Wednesday 14th, 10:50 in Ballroom E.
My plan is to provide an overview over the most popular utilities and applications that a MySQL DBA should be aware of to make his life easier. The focus will be on Linux/Unix applications available under opensource licenses that ease tasks related to user administration, setting up and administering replication setups, performing backups and security audits.
Of course I will cover the usual suspects (e.g. Maatkit), some of these are actually collections of different utilities by themselves. As it's impossible to go over each individual component in the given time frame, I will try to pick out the most popular/useful parts related to the scopes mentioned above. But I will also cover some lesser known gems that migh be worth taking a look at. What's your the most valued tool in your toolchest? I am still looking for more inspiration.
I look forward to being at the conference again and meeting with colleagues and friends in the MySQL community. Judging from the current schedule, it will be a very interesting mix of talks.
If you're interested in attending, you should consider registering soon! The early registration ends on March 15th. Until then, I encourage you to make use of this &#34;Friend of Speaker&#34; discount code (25% off): mys10fsp]]></description>
			<content:encoded><![CDATA[<p><a href="http://conferences.oreilly.com/mysql"><br />
<img border="0" width="120" height="240" style="float: left; margin-top: 10px; margin-bottom: 10px; margin-right: 10px;" src="http://assets.en.oreilly.com/1/event/36/mysql2010_speaking_badge_120x240.gif" alt="O'Reilly MySQL Conference &amp; Expo 2010" title="O'Reilly MySQL Conference &amp; Expo 2010" /></a>I'm happy to announce that my talk &quot;<a href="http://en.oreilly.com/mysql2010/public/schedule/detail/13268">Making MySQL administration a breeze - a look into a MySQL DBA's toolchest</a>&quot; has been accepted for this year's edition of the <a href="http://en.oreilly.com/mysql2010/">MySQL Conference &amp; Expo</a> in Santa Clara, which will take place on April 12-15, 2010. The session is currently scheduled for Wednesday 14th, 10:50 in Ballroom E.</p>
<p>My plan is to provide an overview over the most popular utilities and applications that a MySQL DBA should be aware of to make his life easier. The focus will be on Linux/Unix applications available under opensource licenses that ease tasks related to user administration, setting up and administering replication setups, performing backups and security audits.</p>
<p>Of course I will cover the usual suspects (e.g. <a href="http://www.maatkit.org/">Maatkit</a>), some of these are actually collections of different utilities by themselves. As it's impossible to go over each individual component in the given time frame, I will try to pick out the most popular/useful parts related to the scopes mentioned above. But I will also cover some lesser known gems that migh be worth taking a look at. What's your the most valued tool in your toolchest? I am still looking for more inspiration.</p>
<p>I look forward to being at the conference again and meeting with colleagues and friends in the MySQL community. Judging from the <a href="http://en.oreilly.com/mysql2010/public/schedule/grid">current schedule</a>, it will be a very interesting mix of talks.</p>
<p>If you're interested in attending, you should consider <a href="https://en.oreilly.com/mysql2010/public/register">registering</a> soon! The early registration ends on March 15th. Until then, I encourage you to make use of this &quot;Friend of Speaker&quot; discount code (25% off): mys10fsp</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=23811&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=23811&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2010/03/09/speaking-at-the-oreilly-mysql-conference-expo-a-look-into-a-mysql-dbas-toolchest/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Purging binary logs.</title>
		<link>http://umangg.blogspot.com/2010/01/purging-binary-logs.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=purging-binary-logs</link>
		<comments>http://umangg.blogspot.com/2010/01/purging-binary-logs.html#comments</comments>
		<pubDate>Tue, 12 Jan 2010 21:38:00 +0000</pubDate>
		<dc:creator>Umang Gopani</dc:creator>
				<category><![CDATA[administration]]></category>
		<category><![CDATA[automate]]></category>
		<category><![CDATA[binary logs]]></category>
		<category><![CDATA[purge]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Replication]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Being a MySQL DBA , one faces a common issue in replication environment -&#62; Disk space issue on master, since the number of binary logs have increased.Now, one of the solution to this would be using expire_logs_days parameter in your mysql config file.   But what if, the slave is lagging by few hours or if the slave is broken since few days and the binary logs are removed due to the parameter set. Whenever the salve comes up, it will go bonkers, knowing that the binary log where it last stopped no more exists.I faced this issue a couple of times until I decided to automate it using a script. Herewith I am attaching the URL to my python script which can run regularly in cron.Features : Checks the slaves connected to the master (I have limit it to 3 for now.)Checks the last binary log file which is being used by the slave.All the binary logs until the last bin log used by slave are purged.If a slave is not connected, purging is aborted, so that important bin logs are not purged.You can download this script from here .Tips and Warnings to use this scriptTest a couple of times, different test cases, before using this script on critical or production databases.It is advisable to take backup of data before running this script.You can send the output of this script to syslog or to different mail addresses.You can embed into you alerting system, so that whenever there is a disk space warning on the machine, this scrip is fired. ]]></description>
			<content:encoded><![CDATA[<div><span>Being a MySQL DBA , one faces a common issue in replication environment -> Disk space issue on master, since the number of binary logs have increased.</span></div><div><span>Now, one of the solution to this would be using </span><i><b><span>expire_logs_days </span></b><span><span>parameter in your mysql config file. </span></span></i></div><div><i><span><span>  But what if, the slave is lagging by few hours or if the slave is broken since few days and the binary logs are removed due to the parameter set. Whenever the salve comes up, it will go bonkers, knowing that the binary log where it last stopped no more exists.</span></span></i></div><div><i><span><span><br /></span></span></i></div><div><i><span><span>I faced this issue a couple of times until I decided to automate it using a script. Herewith I am attaching the URL to my python script which can run regularly in cron.</span></span></i></div><div><i><span><span>Features : </span></span></i></div><div><ul><li><i><span><span>Checks the slaves connected to the master (I have limit it to 3 for now.)</span></span></i></li><li><i><span><i><span><span>Checks the last binary log file which is being used by the slave.</span></span></i></span></i></li><li><i><span><i><span><i><span><span>All the binary logs until the last bin log used by slave are purged.</span></span></i></span></i></span></i></li><li><i><span><i><span><i><span><i><span><span>If a slave is not connected, purging is aborted, so that important bin logs are not purged.</span></span></i></span></i></span></i></span></i></li></ul></div><div><span>You can download this script from </span><a href="http://code.activestate.com/recipes/577004/"><span>here</span></a><span> .</span></div><div><span><br /></span></div><div><i><span>Tips and Warnings to use this script</span></i></div><div><ul><li><span>Test a couple of times, different test cases, before using this script on critical or production databases.</span></li><li><span>It is advisable to take backup of data before running this script.</span></li><li><span>You can send the output of this script to syslog or to different mail addresses.</span></li><li><span>You can embed into you alerting system, so that whenever there is a disk space warning on the machine, this scrip is fired. </span></li></ul></div><div><img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/3272151957025671982-5084442369049898087?l=umangg.blogspot.com" alt="" /></div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=23013&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=23013&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2010/01/13/purging-binary-logs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use MySQL? You need Maatkit</title>
		<link>http://www.petefreitag.com/item/724.cfm?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=use-mysql-you-need-maatkit</link>
		<comments>http://www.petefreitag.com/item/724.cfm#comments</comments>
		<pubDate>Fri, 23 Oct 2009 15:26:00 +0000</pubDate>
		<dc:creator>Pete Freitag</dc:creator>
				<category><![CDATA[administration]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[utils]]></category>

		<guid isPermaLink="false">http://www.petefreitag.com/item/724.cfm</guid>
		<description><![CDATA[Maatkit is a pretty useful set of utilities for MySQL. From their site:
You can use Maatkit to prove replication is working correctly, fix corrupted data, automate repetitive tasks, speed up your servers, and much, much more.
One of  the first things you can do after installing the toolkit (which may already be installed if you are running CentOS or Debian) is to run the mk-audit utility. It will give you a nice summary of your server, as well as point out potential problems in your configuration.
Here's a list of all the utilities included in Maatkit:

     
mk-archiver Archive rows from a MySQL table into another table or a file.
mk-audit Analyze, summarize and report on MySQL config, schema and operation
mk-checksum-filter Filter checksums from mk-table-checksum.

mk-deadlock-logger Extract and log MySQL deadlock information.
mk-duplicate-key-checker Find duplicate indexes and foreign keys on MySQL tables.
mk-fifo-split Split files and pipe lines to a fifo without really splitting.
mk-find Find MySQL tables and execute actions, like GNU find.
mk-heartbeat Monitor MySQL replication delay.

mk-kill Kill MySQL queries that match certain criteria.
mk-loadavg Watch MySQL load and take action when it gets too high.
mk-log-player Split and play MySQL slow logs.
mk-parallel-dump Dump sets of MySQL tables in parallel.
mk-parallel-restore Load files into MySQL in parallel.

mk-profile-compact Compact the output from mk-query-profiler.
mk-query-digest Parses logs and more.  Analyze, transform, filter, review and
report on queries.
mk-query-profiler Execute SQL statements and print statistics, or measure
activity caused by other processes.
mk-show-grants Canonicalize and print MySQL grants so you can effectively
replicate, compare and version-control them.
mk-slave-delay Make a MySQL slave server lag behind its master.

mk-slave-find Find and print replication hierarchy tree of MySQL slaves.
mk-slave-move Move a MySQL slave around in the replication hierarchy.
mk-slave-prefetch Pipeline relay logs on a MySQL slave to pre-warm caches.
mk-slave-restart Watch and restart MySQL replication after errors.
mk-table-checksum Perform an online replication consistency check, or
checksum MySQL tables efficiently on one or many servers.

mk-table-sync Synchronize MySQL tables efficiently.
mk-upgrade Execute SQL statements against two MySQL servers and compare the results.
mk-visual-explain Format EXPLAIN output as a tree.

    ]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.maatkit.org/">Maatkit</a> is a pretty useful set of utilities for MySQL. From their site:</p>
<blockquote>You can use Maatkit to prove replication is working correctly, fix corrupted data, automate repetitive tasks, speed up your servers, and much, much more.</blockquote>
<p>One of  the first things you can do after installing the toolkit (which may already be installed if you are running CentOS or Debian) is to run the <code>mk-audit</code> utility. It will give you a nice summary of your server, as well as point out potential problems in your configuration.</p>
<p>Here's a list of all the utilities included in Maatkit:</p>
<ul>
     
<li><strong>mk-archiver</strong> Archive rows from a MySQL table into another table or a file.</li>
<li><strong>mk-audit</strong> Analyze, summarize and report on MySQL config, schema and operation</li>
<li><strong>mk-checksum-filter</strong> Filter checksums from mk-table-checksum.</li>

<li><strong>mk-deadlock-logger</strong> Extract and log MySQL deadlock information.</li>
<li><strong>mk-duplicate-key-checker</strong> Find duplicate indexes and foreign keys on MySQL tables.</li>
<li><strong>mk-fifo-split</strong> Split files and pipe lines to a fifo without really splitting.</li>
<li><strong>mk-find</strong> Find MySQL tables and execute actions, like GNU find.</li>
<li><strong>mk-heartbeat</strong> Monitor MySQL replication delay.</li>

<li><strong>mk-kill</strong> Kill MySQL queries that match certain criteria.</li>
<li><strong>mk-loadavg</strong> Watch MySQL load and take action when it gets too high.</li>
<li><strong>mk-log-player</strong> Split and play MySQL slow logs.</li>
<li><strong>mk-parallel-dump</strong> Dump sets of MySQL tables in parallel.</li>
<li><strong>mk-parallel-restore</strong> Load files into MySQL in parallel.</li>

<li><strong>mk-profile-compact</strong> Compact the output from mk-query-profiler.</li>
<li><strong>mk-query-digest</strong> Parses logs and more.  Analyze, transform, filter, review and
report on queries.</li>
<li><strong>mk-query-profiler</strong> Execute SQL statements and print statistics, or measure
activity caused by other processes.</li>
<li><strong>mk-show-grants</strong> Canonicalize and print MySQL grants so you can effectively
replicate, compare and version-control them.</li>
<li><strong>mk-slave-delay</strong> Make a MySQL slave server lag behind its master.</li>

<li><strong>mk-slave-find</strong> Find and print replication hierarchy tree of MySQL slaves.</li>
<li><strong>mk-slave-move</strong> Move a MySQL slave around in the replication hierarchy.</li>
<li><strong>mk-slave-prefetch</strong> Pipeline relay logs on a MySQL slave to pre-warm caches.</li>
<li><strong>mk-slave-restart</strong> Watch and restart MySQL replication after errors.</li>
<li><strong>mk-table-checksum</strong> Perform an online replication consistency check, or
checksum MySQL tables efficiently on one or many servers.</li>

<li><strong>mk-table-sync</strong> Synchronize MySQL tables efficiently.</li>
<li><strong>mk-upgrade</strong> Execute SQL statements against two MySQL servers and compare the results.</li>
<li><strong>mk-visual-explain</strong> Format EXPLAIN output as a tree.</li>

    </ul><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=21878&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=21878&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2009/10/23/use-mysql-you-need-maatkit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL related bookmark collection</title>
		<link>http://mysqlpreacher.com/wordpress/2009/09/mysql-related-bookmark-collection/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mysql-related-bookmark-collection</link>
		<comments>http://mysqlpreacher.com/wordpress/2009/09/mysql-related-bookmark-collection/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 12:40:27 +0000</pubDate>
		<dc:creator>Darren Cassar</dc:creator>
				<category><![CDATA[administration]]></category>
		<category><![CDATA[Beginner]]></category>
		<category><![CDATA[benchmarking]]></category>
		<category><![CDATA[bookmarks]]></category>
		<category><![CDATA[Cluster]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[general knowledge]]></category>
		<category><![CDATA[HA]]></category>
		<category><![CDATA[InnoDB]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[slow queries]]></category>

		<guid isPermaLink="false">http://mysqlpreacher.com/wordpress/?p=293</guid>
		<description><![CDATA[I am publishing my MySQL related bookmark collection http://www.mysqlpreacher.com/bookmarks/.
Feel free to send me links you think might be good to add in order to help others.
Remember, SHARING IS CARING!!! …. we get so much for free, why shouldn’t we give some back?
Cheers,
Darren]]></description>
			<content:encoded><![CDATA[I am publishing my MySQL related bookmark collection http://www.mysqlpreacher.com/bookmarks/.
Feel free to send me links you think might be good to add in order to help others.
Remember, SHARING IS CARING!!! …. we get so much for free, why shouldn’t we give some back?
Cheers,
Darren<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=21211&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=21211&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2009/09/17/mysql-related-bookmark-collection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

