<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Automating MySQL access with expect and bash scripting</title>
	<atom:link href="http://mysqlpreacher.com/wordpress/2010/02/automating-mysql-access-with-expect-and-bash-scripting/feed/" rel="self" type="application/rss+xml" />
	<link>http://mysqlpreacher.com/wordpress/2010/02/automating-mysql-access-with-expect-and-bash-scripting/</link>
	<description>A MySQL blog, from a MySQL DBA</description>
	<lastBuildDate>Sat, 24 Jul 2010 03:49:07 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Darren Cassar</title>
		<link>http://mysqlpreacher.com/wordpress/2010/02/automating-mysql-access-with-expect-and-bash-scripting/comment-page-1/#comment-148</link>
		<dc:creator>Darren Cassar</dc:creator>
		<pubDate>Thu, 04 Mar 2010 15:49:23 +0000</pubDate>
		<guid isPermaLink="false">http://mysqlpreacher.com/wordpress/?p=327#comment-148</guid>
		<description>SSH keys is indeed a more secure option and is easily integrated in the scripts above but as regards having a password in my.cnf, it&#039;s something I always considered unsafe as incorrect permissions on the my.cnf file can open up mysql access. Also, anyone with root access would be able to cat the file as root and extract any passwords. It&#039;s not difficult to harvest for such entries where a &quot;grep -i pass `find / -name *` 2&gt; /dev/null&quot;. A one liner which would yield a whole list of password entries like the one you mentioned!</description>
		<content:encoded><![CDATA[<p>SSH keys is indeed a more secure option and is easily integrated in the scripts above but as regards having a password in my.cnf, it&#8217;s something I always considered unsafe as incorrect permissions on the my.cnf file can open up mysql access. Also, anyone with root access would be able to cat the file as root and extract any passwords. It&#8217;s not difficult to harvest for such entries where a &#8220;grep -i pass `find / -name *` 2&gt; /dev/null&#8221;. A one liner which would yield a whole list of password entries like the one you mentioned!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ahes</title>
		<link>http://mysqlpreacher.com/wordpress/2010/02/automating-mysql-access-with-expect-and-bash-scripting/comment-page-1/#comment-147</link>
		<dc:creator>ahes</dc:creator>
		<pubDate>Sat, 27 Feb 2010 14:44:42 +0000</pubDate>
		<guid isPermaLink="false">http://mysqlpreacher.com/wordpress/?p=327#comment-147</guid>
		<description>You open doors with a shotgun. Much better way to do this is to create pair of ssh RSA keys with empty passphrase and put public key on every server in ~/.ssh/authorized_keys file. 

Now, to not use login and password to log in into mysql you can create on every machine file ~/.my.cnf with content:

[client]
user = mysql_user_login
password = here_goes_password
host = localhost

After that you after command &#039;mysql&#039; you will be authenticated automagically.

To perform actions in parallel you can use &#039;pssh&#039; package - can be found at http://www.theether.org/pssh/ or in Debian repository.

If you are afraid login via ssh without password you can create a key with passphrase and configure ssh-agent to put the right passphrase on every login.

Alternatively to perform parallel actions you can use cluster ssh software (cssh). It is written in tcl/tk and you can see several terminals at once and run commands simultaneously.

In MS Windows environment there is an excellent Putty Connection Manager. You can define several putty connections and run it in the grid. Then as in cssh you can use built-in multi command sender.</description>
		<content:encoded><![CDATA[<p>You open doors with a shotgun. Much better way to do this is to create pair of ssh RSA keys with empty passphrase and put public key on every server in ~/.ssh/authorized_keys file. </p>
<p>Now, to not use login and password to log in into mysql you can create on every machine file ~/.my.cnf with content:</p>
<p>[client]<br />
user = mysql_user_login<br />
password = here_goes_password<br />
host = localhost</p>
<p>After that you after command &#8216;mysql&#8217; you will be authenticated automagically.</p>
<p>To perform actions in parallel you can use &#8216;pssh&#8217; package &#8211; can be found at <a href="http://www.theether.org/pssh/" rel="nofollow">http://www.theether.org/pssh/</a> or in Debian repository.</p>
<p>If you are afraid login via ssh without password you can create a key with passphrase and configure ssh-agent to put the right passphrase on every login.</p>
<p>Alternatively to perform parallel actions you can use cluster ssh software (cssh). It is written in tcl/tk and you can see several terminals at once and run commands simultaneously.</p>
<p>In MS Windows environment there is an excellent Putty Connection Manager. You can define several putty connections and run it in the grid. Then as in cssh you can use built-in multi command sender.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
