<?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; access</title>
	<atom:link href="http://planetmysql.ru/category/access/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>More New MySQL 5.6 Early Access Features</title>
		<link>http://blogs.oracle.com/MySQL/entry/more_new_mysql_5_6?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=more-new-mysql-5-6-early-access-features</link>
		<comments>http://blogs.oracle.com/MySQL/entry/more_new_mysql_5_6#comments</comments>
		<pubDate>Mon, 01 Aug 2011 15:59:13 +0000</pubDate>
		<dc:creator>Rob Young</dc:creator>
				<category><![CDATA[access]]></category>
		<category><![CDATA[early]]></category>
		<category><![CDATA[InnoDB]]></category>
		<category><![CDATA[labs]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[oscon]]></category>
		<category><![CDATA[Replication]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://blogs.oracle.com/MySQL/entry/more_new_mysql_5_6</guid>
		<description><![CDATA[Last week was a banner week for MySQL at OSCON. We had many MySQL developers meeting with the MySQL community, conducting technical sessions, leading BOF sessions, working the exhibit hall, and confirming Oracle's leadership in the technical evolution of MySQL.&#160; The highlight of the week was the unveiling of even more 5.6 early access InnoDB and Replication features that are now available for early adopters to download, evaluate and shape via labs.mysql.com. &#160;InnoDB is one of MySQL's &#34;crown jewels&#34; and beginning in 5.5 is now the default storage engine.&#160; The following 5.6 feature improvements are in direct response to community and customer feedback and requests.&#160; The new 5.6 early access features include: 
   
   
    Full-text search 
    REDO log files max size extended to 2 TB 
    UNDO logs on their own tablespace 
    Buffer Pool options for pre-loading/warming on re-start 
    Improved auto-extension of .ibd files 
    Support for smaller 4k, 8k page sizes 
  Replication is by far the most popular and widely used MySQL feature. The following feature improvements in 5.6 are also in direct response to community and customer feedback and requests.&#160; The new 5.6 early access features include: 
   
    New Binlog API 
    Binlog group commit (completes InnoDB group commit implemented in MySQL 5.5) 
    Durable Slave Reads 
    Enhanced multi-threaded slaves 
  You can read about the details, including development blogs on how to get started with each in this new DevZone article.&#160; My sincere thanks and appreciation to the InnoDB and Replication development teams for their leadership in technical innovation and mind share and for their dedicated work in providing these and other new features &#34;early and often&#34; to the MySQL community.&#160; Stay tuned for more to come!We can't say this &#34;early and often&#34; enough...thanks for your continued support of MySQL!]]></description>
			<content:encoded><![CDATA[<p>
Last week was a banner week for MySQL at OSCON. We had many MySQL developers meeting with the MySQL community, conducting technical sessions, leading BOF sessions, working the exhibit hall, and confirming Oracle's leadership in the technical evolution of MySQL.&nbsp; The highlight of the week was the unveiling of even more 5.6 early access InnoDB and Replication features that are now available for early adopters to download, evaluate and shape via <a href="http://labs.mysql.com/">labs.mysql.com</a>. &nbsp;<br /><br />InnoDB is one of MySQL's &quot;crown jewels&quot; and beginning in 5.5 is now the default storage engine.&nbsp; The following 5.6 feature improvements are in direct response to community and customer feedback and requests.&nbsp; The new 5.6 early access features include:</p> 
  <p><br /></p> 
  <ul> 
    <li>Full-text search<br /></li> 
    <li>REDO log files max size extended to 2 TB</li> 
    <li>UNDO logs on their own tablespace</li> 
    <li>Buffer Pool options for pre-loading/warming on re-start</li> 
    <li>Improved auto-extension of .ibd files</li> 
    <li>Support for smaller 4k, 8k page sizes</li> 
  </ul><br />Replication is by far the most popular and widely used MySQL feature. The following feature improvements in 5.6 are also in direct response to community and customer feedback and requests.&nbsp; The new 5.6 early access features include:<br /> 
  <ul> 
    <li>New Binlog API</li> 
    <li>Binlog group commit (completes InnoDB group commit implemented in MySQL 5.5)</li> 
    <li>Durable Slave Reads</li> 
    <li>Enhanced multi-threaded slaves</li> 
  </ul>You can read about the details, including development blogs on how to get started with each in this <a href="http://dev.mysql.com/tech-resources/articles/mysql56-labs-july2011.html">new DevZone article</a>.&nbsp; My sincere thanks and appreciation to the InnoDB and Replication development teams for their leadership in technical innovation and mind share and for their dedicated work in providing these and other new features &quot;early and often&quot; to the MySQL community.&nbsp; Stay tuned for more to come!<br /><br />We can't say this &quot;early and often&quot; enough...thanks for your continued support of MySQL!<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=29592&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=29592&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2011/08/01/more-new-mysql-5-6-early-access-features/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automating MySQL access with expect and bash scripting</title>
		<link>http://mysqlpreacher.com/wordpress/2010/02/automating-mysql-access-with-expect-and-bash-scripting/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=automating-mysql-access-with-expect-and-bash-scripting</link>
		<comments>http://mysqlpreacher.com/wordpress/2010/02/automating-mysql-access-with-expect-and-bash-scripting/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 17:08:26 +0000</pubDate>
		<dc:creator>Darren Cassar</dc:creator>
				<category><![CDATA[access]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[expect]]></category>
		<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mysqlpreacher.com/wordpress/?p=327</guid>
		<description><![CDATA[If you have multiple database servers with strange names, or if you have to hop over multiple machines to connect to any mysql database server, then you know what a pain it can be to administer such a setup. Thanks to some scripting, you can automate such tasks as follows:
Create an expect script:
/path/to/sshmysql.exp
#!/usr/bin/expect -f
#script by darren cassar
#mysqlpreacher.com
set machine  [lindex $argv 0]
set timeout -1
spawn ssh username@$machine
match_max 100000
expect -exact &#8220;assword: &#8221;
send &#8212; &#8220;password\r&#8221;
send &#8212; &#8220;sudo -k; sudo su &#8211; mysql\r&#8221;
expect -exact &#8220;sudo -k; sudo su &#8211; mysql&#8221;
expect -exact &#8220;assword:&#8221;
send &#8212; &#8220;password\r&#8221;
interact
# you should change the word password in &#8217;send &#8212; &#8220;password\r&#8221;&#8216; to your login password
# if you have the same password for each environment you could also script logging into mysql directly from the same expect script BUT that is not recommended.
Create a bash script:
/path/to/login.sh
#!/bin/bash
#script by darren cassar
#mysqlpreacher.com
sm=&#8217;/path/to/sshmysql.exp&#8217;
menu() {
  echo &#8221; 101 &#8211; dev.databaseserver1 &#8221;
  echo &#8221; 102 &#8211; dev.databaseserver2 &#8221;
  echo &#8221; 103 &#8211; dev.databaseserver3 &#8221;
  echo &#8221; 201 &#8211; qa.databaseserver1 &#8221;
  echo &#8221; 301 &#8211; uat.databaseserver1 &#8221;
  echo &#8221; 302 &#8211; uat.databaseserver2 &#8221;
  echo &#8221; 401 &#8211; prod.databaseserver1 &#8221;
  echo &#8221; &#8221;
}
ARGUMENT=notmenu
if [ -z "$1" ]
  then
    ARGUMENT=menu
else
  choice=$1
fi
if [ $ARGUMENT = "menu" ]
  then
    menu
else
  case &#8220;$choice&#8221; in
  101&#124;dev.databaseserver1   ) $sm dev.databaseserver1;;
  102&#124;dev.databaseserver2   ) $sm dev.databaseserver2;;
  103&#124;dev.databaseserver3   ) $sm dev.databaseserver3;;
  201&#124;qa.databaseserver1   ) $sm qa.databaseserver1;;
  301&#124;uat.databaseserver1   ) $sm uat.databaseserver1;;
  302&#124;uat.databaseserver2   ) $sm uat.databaseserver2;;
  401&#124;prod.databaseserver1   ) $sm prod.databaseserver1;;
  *        ) echo &#8220;Wrong value passed to script&#8221;
             menu ;;
  esac
fi
alias l=&#8217;/path/to/login.sh&#8217;
Output: 
[darrencassar@mymachine ~ ]$ l
 101 &#8211; dev.databaseserver1
 102 &#8211; dev.databaseserver2
 103 &#8211; dev.databaseserver3
 201 &#8211; qa.databaseserver1
 301 &#8211; uat.databaseserver1
 302 &#8211; uat.databaseserver2
 401 &#8211; prod.databaseserver1
Output:
The below command would log you into the first development database server as mysql user.
[darrencassar@mymachine ~ ]$ l 101 
On each machine place aliases for each instance in the .profile
alias use3306=&#8217;mysql -u root -p -h 127.0.0.1 -P 3306 &#8211;prompt=&#8221;mysql \D&#62; &#8220;&#8216;
The above setup can be used using any client/server OS: Linux, Solaris, MAC OS or Windows(running Cygwin)
NOTE: If you store the password in clear text inside the expect script, you should at least save the scripts inside an encrypted partition on your machine and make sure that folder is not shared or accessible by anyone. Another way of doing it would be to use either SSHKeys OR save the password inside a file and encrypt it using OpenSSL
Enjoy!]]></description>
			<content:encoded><![CDATA[<p>If you have multiple database servers with strange names, or if you have to hop over multiple machines to connect to any mysql database server, then you know what a pain it can be to administer such a setup. Thanks to some scripting, you can automate such tasks as follows:</p>
<p>Create an expect script:<br />
/path/to/sshmysql.exp</p>
<blockquote><p>#!/usr/bin/expect -f<br />
#script by darren cassar<br />
#mysqlpreacher.com</p>
<p>set machine  [lindex $argv 0]</p>
<p>set timeout -1</p>
<p>spawn ssh username@$machine<br />
match_max 100000<br />
expect -exact &#8220;assword: &#8221;<br />
send &#8212; &#8220;password\r&#8221;<br />
send &#8212; &#8220;sudo -k; sudo su &#8211; mysql\r&#8221;<br />
expect -exact &#8220;sudo -k; sudo su &#8211; mysql&#8221;<br />
expect -exact &#8220;assword:&#8221;<br />
send &#8212; &#8220;password\r&#8221;<br />
interact</p></blockquote>
<p># you should change the word password in &#8217;send &#8212; &#8220;password\r&#8221;&#8216; to your login password<br />
# if you have the same password for each environment you could also script logging into mysql directly from the same expect script BUT that is not recommended.</p>
<p>Create a bash script:<br />
/path/to/login.sh</p>
<blockquote><p>#!/bin/bash<br />
#script by darren cassar<br />
#mysqlpreacher.com</p>
<p>sm=&#8217;/path/to/sshmysql.exp&#8217;</p>
<p>menu() {<br />
  echo &#8221; 101 &#8211; dev.databaseserver1 &#8221;<br />
  echo &#8221; 102 &#8211; dev.databaseserver2 &#8221;<br />
  echo &#8221; 103 &#8211; dev.databaseserver3 &#8221;<br />
  echo &#8221; 201 &#8211; qa.databaseserver1 &#8221;<br />
  echo &#8221; 301 &#8211; uat.databaseserver1 &#8221;<br />
  echo &#8221; 302 &#8211; uat.databaseserver2 &#8221;<br />
  echo &#8221; 401 &#8211; prod.databaseserver1 &#8221;<br />
  echo &#8221; &#8221;<br />
}</p>
<p>ARGUMENT=notmenu</p>
<p>if [ -z "$1" ]<br />
  then<br />
    ARGUMENT=menu<br />
else<br />
  choice=$1<br />
fi</p>
<p>if [ $ARGUMENT = "menu" ]<br />
  then<br />
    menu<br />
else<br />
  case &#8220;$choice&#8221; in<br />
  101|dev.databaseserver1   ) $sm dev.databaseserver1;;<br />
  102|dev.databaseserver2   ) $sm dev.databaseserver2;;<br />
  103|dev.databaseserver3   ) $sm dev.databaseserver3;;<br />
  201|qa.databaseserver1   ) $sm qa.databaseserver1;;<br />
  301|uat.databaseserver1   ) $sm uat.databaseserver1;;<br />
  302|uat.databaseserver2   ) $sm uat.databaseserver2;;<br />
  401|prod.databaseserver1   ) $sm prod.databaseserver1;;<br />
  *        ) echo &#8220;Wrong value passed to script&#8221;<br />
             menu ;;<br />
  esac<br />
fi</p></blockquote>
<blockquote><p>alias l=&#8217;/path/to/login.sh&#8217;</p></blockquote>
<p>Output: </p>
<blockquote><p>[darrencassar@mymachine ~ ]$ l<br />
 101 &#8211; dev.databaseserver1<br />
 102 &#8211; dev.databaseserver2<br />
 103 &#8211; dev.databaseserver3<br />
 201 &#8211; qa.databaseserver1<br />
 301 &#8211; uat.databaseserver1<br />
 302 &#8211; uat.databaseserver2<br />
 401 &#8211; prod.databaseserver1</p></blockquote>
<p>Output:<br />
The below command would log you into the first development database server as mysql user.</p>
<blockquote><p>[darrencassar@mymachine ~ ]$ l 101 </p></blockquote>
<p>On each machine place aliases for each instance in the .profile</p>
<blockquote><p>alias use3306=&#8217;mysql -u root -p -h 127.0.0.1 -P 3306 &#8211;prompt=&#8221;mysql \D> &#8220;&#8216;</p></blockquote>
<p>The above setup can be used using any client/server OS: Linux, Solaris, MAC OS or Windows(running Cygwin)</p>
<p><strong>NOTE: If you store the password in clear text inside the expect script, you should at least save the scripts inside an encrypted partition on your machine and make sure that folder is not shared or accessible by anyone. Another way of doing it would be to use either SSHKeys OR save the password inside a file and encrypt it using <a href="http://www.madboa.com/geek/openssl/#encrypt-simple" >OpenSSL</a></strong></p>
<p>Enjoy!</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=23385&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=23385&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2010/02/08/automating-mysql-access-with-expect-and-bash-scripting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

