<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Linux Adminstration Tips</title>
	<atom:link href="http://ahp2009.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://ahp2009.wordpress.com</link>
	<description></description>
	<lastBuildDate>Thu, 01 Dec 2011 15:34:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='ahp2009.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Linux Adminstration Tips</title>
		<link>http://ahp2009.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://ahp2009.wordpress.com/osd.xml" title="Linux Adminstration Tips" />
	<atom:link rel='hub' href='http://ahp2009.wordpress.com/?pushpress=hub'/>
		<item>
		<title>How to Read MySQL Binary Log Files (BinLog) with mysqlbinlog</title>
		<link>http://ahp2009.wordpress.com/2011/02/25/how-to-read-mysql-binary-log-files-binlog-with-mysqlbinlog/</link>
		<comments>http://ahp2009.wordpress.com/2011/02/25/how-to-read-mysql-binary-log-files-binlog-with-mysqlbinlog/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 09:36:35 +0000</pubDate>
		<dc:creator>ahp2009</dc:creator>
				<category><![CDATA[mysql_replication]]></category>

		<guid isPermaLink="false">http://ahp2009.wordpress.com/?p=364</guid>
		<description><![CDATA[&#160; Binary log file, which normally has name with the format host_name-bin.xxxxxx and store in /var/lib/mysql directory, could not be opened and read straight away as it’s in unreadable binary format. To read the binary logs in text format, we can make use of mysqlbinlog command, which also able to readrelay log files written by [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahp2009.wordpress.com&amp;blog=8068052&amp;post=364&amp;subd=ahp2009&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p><a name="12e19b8dcf50836a_KonaLink2"></a><span style="font-size:medium;">Binary log file, which normally has name with the format host_name-bin.xxxxxx and store in /var/lib/mysql directory, could not be opened and read straight away as it’s in unreadable binary format. To read the binary logs in text format, we can make use of mysqlbinlog command, which also able to readrelay log files written by a slave server in a replication setup. Relay logs have the same format as binary log files.</span></p>
<p>&nbsp;</p>
<p><span style="font-size:medium;">To use mysqlbinlog utility is simple, simply use the following command syntax to invoke mysqlbinlog after login in as root (else you have to specify user name and password) to shell via SSH:</span></p>
<p><code>mysqlbinlog [options] log_file ...</code></p>
<p>So to read and display the contents of the binary log file named binlog.000001, use this command:</p>
<p><code>mysqlbinlog binlog.000001</code></p>
<p>The binary log files and its data are likely to be very huge, thus making it almost impossible to read anything on screen. However, you can pipe the output of mysqlbinlog into a file which can be open up for later browsing in text editor, by using the following command:</p>
<p><code>mysqlbinlog binlog.000001 &gt; filename.txt</code></p>
<p>To reduce the amount of data retrieved from binary logs, there are several options that can be used to limit the data that is been returned. Among the useful ones are listed below:</p>
<p><em>–start-datetime=datetime</em></p>
<p><a name="12e19b8dcf50836a_KonaLink3"></a> Start reading the binary log at the first event having a timestamp equal to or later than the datetime argument. The datetime value is relative to the local time zone on the machine where you run mysqlbinlog. The value should be in a format accepted for the DATETIME or TIMESTAMP data types <a href="http://www.mydigitallife.info/2007/10/06/how-to-read-mysql-binary-log-files-binlog-with-mysqlbinlog/#" target="_blank"><span style="color:#0000ff;"><span style="font-family:inherit;"></span></span></a>. For example:</p>
<p><code>mysqlbinlog --start-datetime="2005-12-25 11:25:56" binlog.000001</code></p>
<p><em>–stop-datetime=datetime</em></p>
<p><a name="12e19b8dcf50836a_KonaLink4"></a>Stop reading the binary log at the first event having a timestamp equal or posterior to the datetime argument. This option is useful for point-in-time recovery<a href="http://www.mydigitallife.info/2007/10/06/how-to-read-mysql-binary-log-files-binlog-with-mysqlbinlog/#" target="_blank"><span style="color:#0000ff;"><span style="font-family:inherit;"></span></span></a>. See the description of the –start-datetime option for information about the datetime value.</p>
<p><em>–start-position=N</em></p>
<p>Start reading the binary log at the first event having a position equal to the N argument. This option applies to the first log file named on the command line.</p>
<p><em>–stop-position=N</em></p>
<p>Stop reading the binary log at the first event having a position equal or greater than the N argument. This option applies to the last log file named on the command line.</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ahp2009.wordpress.com/364/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ahp2009.wordpress.com/364/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ahp2009.wordpress.com/364/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ahp2009.wordpress.com/364/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ahp2009.wordpress.com/364/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ahp2009.wordpress.com/364/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ahp2009.wordpress.com/364/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ahp2009.wordpress.com/364/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ahp2009.wordpress.com/364/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ahp2009.wordpress.com/364/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ahp2009.wordpress.com/364/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ahp2009.wordpress.com/364/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ahp2009.wordpress.com/364/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ahp2009.wordpress.com/364/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahp2009.wordpress.com&amp;blog=8068052&amp;post=364&amp;subd=ahp2009&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ahp2009.wordpress.com/2011/02/25/how-to-read-mysql-binary-log-files-binlog-with-mysqlbinlog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2765ddd042bc8fc7d4b46ec42aed3427?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ahp2009</media:title>
		</media:content>
	</item>
		<item>
		<title>Ubuntu: How To Create an ISO Image from a CD or DVD</title>
		<link>http://ahp2009.wordpress.com/2011/02/14/ubuntu-how-to-create-an-iso-image-from-a-cd-or-dvd/</link>
		<comments>http://ahp2009.wordpress.com/2011/02/14/ubuntu-how-to-create-an-iso-image-from-a-cd-or-dvd/#comments</comments>
		<pubDate>Mon, 14 Feb 2011 12:13:55 +0000</pubDate>
		<dc:creator>ahp2009</dc:creator>
				<category><![CDATA[basic]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://ahp2009.wordpress.com/?p=356</guid>
		<description><![CDATA[1. Insert the CD or DVD that you want to make an ISO image of. 2. Open a terminal window. Execute the following command: cat /dev/scd0 &#62; /home/iso/test.iso where, &#160; /dev/scd0 --&#62; path of the dvd device /home/iso/test.iso --&#62; name of the iso file Ubuntu: How to Mount and Unmount ISO Files 1. Open a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahp2009.wordpress.com&amp;blog=8068052&amp;post=356&amp;subd=ahp2009&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } 		H2 { margin-bottom: 0.21cm } 		H2.cjk { font-family: "DejaVu Sans" } 		H2.ctl { font-family: "Tahoma" } 		A:link { so-language: zxx } -->1. Insert the CD or DVD that you want to make an ISO image of.</p>
<p>2. Open a terminal window.</p>
<ol>
<li>Execute the following command:</li>
</ol>
<p><code>cat /dev/scd0 &gt; /home/iso/test.iso</code></p>
<p>where,</p>
<p>&nbsp;</p>
<p><code>/dev/scd0 --&gt; path of the dvd device</code></p>
<p><code> /home/iso/test.iso --&gt; name of the iso file</code></p>
<h2>Ubuntu: How to Mount and Unmount ISO Files</h2>
<p>1. Open a terminal window.</p>
<ol>
<li>You will need to create a new directory for your ISO image. 	Execute the following command in your terminal window:</li>
</ol>
<p><code>sudo mkdir /media/iso</code></p>
<ol>
<li>Now execute this command to mount the ISO image:</li>
</ol>
<p><code>mount -o loop /home/shamanstears/Documents/test.iso /media/iso/</code></p>
<p>4.  Type <strong>ls /media/iso</strong> in terminal for list the files from iso images.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ahp2009.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ahp2009.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ahp2009.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ahp2009.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ahp2009.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ahp2009.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ahp2009.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ahp2009.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ahp2009.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ahp2009.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ahp2009.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ahp2009.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ahp2009.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ahp2009.wordpress.com/356/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahp2009.wordpress.com&amp;blog=8068052&amp;post=356&amp;subd=ahp2009&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ahp2009.wordpress.com/2011/02/14/ubuntu-how-to-create-an-iso-image-from-a-cd-or-dvd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2765ddd042bc8fc7d4b46ec42aed3427?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ahp2009</media:title>
		</media:content>
	</item>
		<item>
		<title>script for ping the host</title>
		<link>http://ahp2009.wordpress.com/2011/01/31/script-for-ping-the-host/</link>
		<comments>http://ahp2009.wordpress.com/2011/01/31/script-for-ping-the-host/#comments</comments>
		<pubDate>Mon, 31 Jan 2011 07:31:49 +0000</pubDate>
		<dc:creator>ahp2009</dc:creator>
				<category><![CDATA[shell script]]></category>

		<guid isPermaLink="false">http://ahp2009.wordpress.com/?p=352</guid>
		<description><![CDATA[#!/bin/bash # Script for check ping packet for myHost in $(cat ip.txt) do ping -c 4 $myHost&#62;/dev/null; count=$(echo $?) if [ $count -eq 0 ]; then echo &#8220;Host $myHost is UP&#8221; else echo &#8220;Host $myHost is DOWN&#8221; fi done<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahp2009.wordpress.com&amp;blog=8068052&amp;post=352&amp;subd=ahp2009&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>#!/bin/bash<br />
# Script for check ping packet</p>
<p>for myHost in $(cat ip.txt)<br />
do<br />
ping -c 4 $myHost&gt;/dev/null;<br />
count=$(echo $?)<br />
if [ $count -eq 0 ]; then<br />
echo &#8220;Host $myHost is UP&#8221;<br />
else<br />
echo &#8220;Host $myHost is DOWN&#8221;<br />
fi<br />
done</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ahp2009.wordpress.com/352/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ahp2009.wordpress.com/352/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ahp2009.wordpress.com/352/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ahp2009.wordpress.com/352/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ahp2009.wordpress.com/352/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ahp2009.wordpress.com/352/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ahp2009.wordpress.com/352/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ahp2009.wordpress.com/352/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ahp2009.wordpress.com/352/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ahp2009.wordpress.com/352/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ahp2009.wordpress.com/352/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ahp2009.wordpress.com/352/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ahp2009.wordpress.com/352/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ahp2009.wordpress.com/352/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahp2009.wordpress.com&amp;blog=8068052&amp;post=352&amp;subd=ahp2009&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ahp2009.wordpress.com/2011/01/31/script-for-ping-the-host/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2765ddd042bc8fc7d4b46ec42aed3427?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ahp2009</media:title>
		</media:content>
	</item>
		<item>
		<title>script for ping and write it to log,if down ur server only</title>
		<link>http://ahp2009.wordpress.com/2011/01/31/script-for-ping/</link>
		<comments>http://ahp2009.wordpress.com/2011/01/31/script-for-ping/#comments</comments>
		<pubDate>Mon, 31 Jan 2011 07:28:53 +0000</pubDate>
		<dc:creator>ahp2009</dc:creator>
				<category><![CDATA[shell script]]></category>

		<guid isPermaLink="false">http://ahp2009.wordpress.com/?p=348</guid>
		<description><![CDATA[# ping a site if no response then email a message site=&#8221;your ip&#8221; logfile=&#8221;/home/hariprakash/pinglog&#8221; pagefile=&#8221;/home/hariprakash/down&#8221; pagesite=&#8221;your ip&#8221; ping -c 2 $site &#62; /dev/null #if 100% packet loss &#8211; a bad ping if [ $? -gt 0 ] then echo bad ping to $site on `date` &#62;&#62;$logfile #can we connect to the mail server or some [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahp2009.wordpress.com&amp;blog=8068052&amp;post=348&amp;subd=ahp2009&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } --># ping a site if no response then email a message</p>
<p>site=&#8221;your ip&#8221;</p>
<p>logfile=&#8221;/home/hariprakash/pinglog&#8221;</p>
<p>pagefile=&#8221;/home/hariprakash/down&#8221;</p>
<p>pagesite=&#8221;your ip&#8221;</p>
<p>ping -c 2 $site &gt; /dev/null</p>
<p>#if 100% packet loss &#8211; a bad ping</p>
<p>if [ $? -gt 0 ]</p>
<p>then echo bad ping to $site on `date` &gt;&gt;$logfile</p>
<p>#can we connect to the mail server or some other outside server?</p>
<p>ping -c 2 $pagesite</p>
<p># if we can&#8217;t ping the outside, then record so</p>
<p>if [ $? -gt 0 ]</p>
<p>then echo bad ping to $pagesite on `date` &gt;&gt; $logfile</p>
<p>fi</p>
<p># go ahead and email.. will get it sooner or later</p>
<p>#cat $pagefile |sendmail -t</p>
<p># instead of sendmail, you could use mail</p>
<p>cat $pagefile | mail -s &#8221; mail server &#8220;your ipdaddress&#8221; site is down&#8221; hari.prakash@tnq.co.in</p>
<p>else touch &#8220;$logfile&#8221;</p>
<p>fi</p>
<p>we need to add the below content to “down” file</p>
<p>hariprakash@test-server:~$ vim down</p>
<p>From: a_valid_email_address</p>
<p>TO: a_valid_email_address</p>
<p>Subject: URDOWN</p>
<p>We can not ping</p>
<p>your IP/name server..</p>
<p>just u use command</p>
<p>touch pinglog</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ahp2009.wordpress.com/348/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ahp2009.wordpress.com/348/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ahp2009.wordpress.com/348/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ahp2009.wordpress.com/348/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ahp2009.wordpress.com/348/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ahp2009.wordpress.com/348/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ahp2009.wordpress.com/348/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ahp2009.wordpress.com/348/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ahp2009.wordpress.com/348/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ahp2009.wordpress.com/348/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ahp2009.wordpress.com/348/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ahp2009.wordpress.com/348/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ahp2009.wordpress.com/348/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ahp2009.wordpress.com/348/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahp2009.wordpress.com&amp;blog=8068052&amp;post=348&amp;subd=ahp2009&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ahp2009.wordpress.com/2011/01/31/script-for-ping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2765ddd042bc8fc7d4b46ec42aed3427?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ahp2009</media:title>
		</media:content>
	</item>
		<item>
		<title>Script for backup the file and append the status of the copy in to the file with date and time</title>
		<link>http://ahp2009.wordpress.com/2011/01/31/script-for-backup-the-file-and-append-the-status-of-the-copy-in-to-the-file-with-date-and-time/</link>
		<comments>http://ahp2009.wordpress.com/2011/01/31/script-for-backup-the-file-and-append-the-status-of-the-copy-in-to-the-file-with-date-and-time/#comments</comments>
		<pubDate>Mon, 31 Jan 2011 07:24:29 +0000</pubDate>
		<dc:creator>ahp2009</dc:creator>
				<category><![CDATA[shell script]]></category>

		<guid isPermaLink="false">http://ahp2009.wordpress.com/?p=346</guid>
		<description><![CDATA[root@test-server:~# cat a.sh rsync -r -v /root/known_hosts /testing &#124; sed &#8220;s/$/, $(date)/&#8221; &#62;&#62;/home/hariprakash/ab.txt &#160; &#160; sed &#8220;s/$/, $(date)/&#8221; ==&#62; append the date and time to the file &#160; OUTPUT LOG: root@test-server:~# cat /home/hariprakash/ab.txt &#160; &#160; sending incremental file list,Sat Jan 29 15:54:08 IST 2011 &#160; known_hosts,Sat Jan 29 15:54:08 IST 2011 &#160; ,Sat Jan 29 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahp2009.wordpress.com&amp;blog=8068052&amp;post=346&amp;subd=ahp2009&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } -->root@test-server:~# cat a.sh</p>
<p>rsync -r -v /root/known_hosts /testing | sed &#8220;s/$/, $(date)/&#8221; &gt;&gt;/home/hariprakash/ab.txt</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>sed &#8220;s/$/, $(date)/&#8221;  <strong>==&gt;</strong> append the  date and time to the file</p>
<p>&nbsp;</p>
<p><strong>OUTPUT LOG:</strong></p>
<p>root@test-server:~# cat /home/hariprakash/ab.txt</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>sending incremental file list,Sat Jan 29 15:54:08 IST 2011</p>
<p>&nbsp;</p>
<p>known_hosts,Sat Jan 29 15:54:08 IST 2011</p>
<p>&nbsp;</p>
<p>,Sat Jan 29 15:54:08 IST 2011</p>
<p>&nbsp;</p>
<p>sent 10685 bytes  received 31 bytes  21432.00 bytes/sec,Sat Jan 29 15:54:08 IST 2011</p>
<p>&nbsp;</p>
<p>total size is 10608  speedup is 0.99,Sat Jan 29 15:54:08 IST 2011</p>
<p>&nbsp;</p>
<p>sending incremental file list,Sat Jan 29 15:54:25 IST 2011</p>
<p>&nbsp;</p>
<p>known_hosts,Sat Jan 29 15:54:25 IST 2011</p>
<p>&nbsp;</p>
<p>,Sat Jan 29 15:54:25 IST 2011</p>
<p>&nbsp;</p>
<p>sent 10685 bytes  received 31 bytes  21432.00 bytes/sec,Sat Jan 29 15:54:25 IST 2011</p>
<p>&nbsp;</p>
<p>total size is 10608  speedup is 0.99,Sat Jan 29 15:54:25 IST 2011</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ahp2009.wordpress.com/346/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ahp2009.wordpress.com/346/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ahp2009.wordpress.com/346/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ahp2009.wordpress.com/346/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ahp2009.wordpress.com/346/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ahp2009.wordpress.com/346/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ahp2009.wordpress.com/346/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ahp2009.wordpress.com/346/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ahp2009.wordpress.com/346/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ahp2009.wordpress.com/346/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ahp2009.wordpress.com/346/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ahp2009.wordpress.com/346/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ahp2009.wordpress.com/346/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ahp2009.wordpress.com/346/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahp2009.wordpress.com&amp;blog=8068052&amp;post=346&amp;subd=ahp2009&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ahp2009.wordpress.com/2011/01/31/script-for-backup-the-file-and-append-the-status-of-the-copy-in-to-the-file-with-date-and-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2765ddd042bc8fc7d4b46ec42aed3427?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ahp2009</media:title>
		</media:content>
	</item>
		<item>
		<title>apache2: apr_sockaddr_info_get failed for  If you are getting this error when you try to start or restart apache</title>
		<link>http://ahp2009.wordpress.com/2011/01/14/apache2-apr_sockaddr_info_get-failed-for-if-you-are-getting-this-error-when-you-try-to-start-or-restart-apache/</link>
		<comments>http://ahp2009.wordpress.com/2011/01/14/apache2-apr_sockaddr_info_get-failed-for-if-you-are-getting-this-error-when-you-try-to-start-or-restart-apache/#comments</comments>
		<pubDate>Fri, 14 Jan 2011 07:09:56 +0000</pubDate>
		<dc:creator>ahp2009</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[Error&solution]]></category>

		<guid isPermaLink="false">http://ahp2009.wordpress.com/?p=341</guid>
		<description><![CDATA[apache2: apr_sockaddr_info_get failed for If you are getting this error when you try to start or restart apache : &#160; apache2: apr_sockaddr_info_get() failed for pirat9-desktop apache2: Could not reliably determine the server&#8217;s fully qualified domain name, using 127.0.0.1 for ServerName [ OK ] &#160; &#160; The solution is the following : &#160; Open apache2.conf file [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahp2009.wordpress.com&amp;blog=8068052&amp;post=341&amp;subd=ahp2009&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } --><strong>apache2: apr_sockaddr_info_get failed for </strong></p>
<p><strong>If you are getting this error when you try to start or restart apache : </strong></p>
<p>&nbsp;</p>
<p>apache2: apr_sockaddr_info_get() failed for pirat9-desktop</p>
<p>apache2: Could not reliably determine the server&#8217;s fully qualified domain name, using 127.0.0.1 for ServerName</p>
<p>[ OK ]</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The solution is the following :</p>
<p>&nbsp;</p>
<p>Open apache2.conf file :</p>
<p>&nbsp;</p>
<p>sudo  vi  /etc/apache2/apache2.conf</p>
<p>&nbsp;</p>
<p>and  add  this line :</p>
<p>&nbsp;</p>
<p>ServerName localhost</p>
<p>&nbsp;</p>
<p>Save  and  exit</p>
<p>&nbsp;</p>
<p>restart   again</p>
<p>&nbsp;</p>
<p>$ sudo    /etc/init.d/apache2  restart</p>
<p>&nbsp;</p>
<p>* Restarting web server apache2                                               &#8230; waiting                                                           [ OK ]</p>
<p>&nbsp;</p>
<p>$</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ahp2009.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ahp2009.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ahp2009.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ahp2009.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ahp2009.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ahp2009.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ahp2009.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ahp2009.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ahp2009.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ahp2009.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ahp2009.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ahp2009.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ahp2009.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ahp2009.wordpress.com/341/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahp2009.wordpress.com&amp;blog=8068052&amp;post=341&amp;subd=ahp2009&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ahp2009.wordpress.com/2011/01/14/apache2-apr_sockaddr_info_get-failed-for-if-you-are-getting-this-error-when-you-try-to-start-or-restart-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2765ddd042bc8fc7d4b46ec42aed3427?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ahp2009</media:title>
		</media:content>
	</item>
		<item>
		<title>Uninstall / Delete / Remove Package</title>
		<link>http://ahp2009.wordpress.com/2010/12/16/uninstall-delete-remove-package/</link>
		<comments>http://ahp2009.wordpress.com/2010/12/16/uninstall-delete-remove-package/#comments</comments>
		<pubDate>Thu, 16 Dec 2010 10:25:17 +0000</pubDate>
		<dc:creator>ahp2009</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://ahp2009.wordpress.com/?p=338</guid>
		<description><![CDATA[Just use the following syntax: sudo apt-get remove {package-name} For example remove package called xinetd, enter: $ sudo apt-get remove xinetd Remove package called xinetd along with all configuration files, enter: $ sudo apt-get --purge remove xinetd To list all installed package, enter:\ dpkg --list dpkg --list &#124; less dpkg --list &#124; grep -i 'http'<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahp2009.wordpress.com&amp;blog=8068052&amp;post=338&amp;subd=ahp2009&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3></h3>
<p>Just use the following syntax:<br />
sudo apt-get remove {package-name}</p>
<p>For example remove package called xinetd, enter:<br />
<code>$ sudo apt-get remove </code>xinetd</p>
<p>Remove package called xinetd along with all configuration files, enter:<br />
<code>$ sudo apt-get --purge remove </code>xinetd</p>
<p>To list all installed package, enter:\<br />
<code>dpkg --list<br />
dpkg --list | less<br />
dpkg --list | grep -i 'http'</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ahp2009.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ahp2009.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ahp2009.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ahp2009.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ahp2009.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ahp2009.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ahp2009.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ahp2009.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ahp2009.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ahp2009.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ahp2009.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ahp2009.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ahp2009.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ahp2009.wordpress.com/338/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahp2009.wordpress.com&amp;blog=8068052&amp;post=338&amp;subd=ahp2009&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ahp2009.wordpress.com/2010/12/16/uninstall-delete-remove-package/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2765ddd042bc8fc7d4b46ec42aed3427?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ahp2009</media:title>
		</media:content>
	</item>
		<item>
		<title>Fixing MySQL Replication with duplicate key error</title>
		<link>http://ahp2009.wordpress.com/2010/12/15/fixing-mysql-replication-with-duplicate-key-error/</link>
		<comments>http://ahp2009.wordpress.com/2010/12/15/fixing-mysql-replication-with-duplicate-key-error/#comments</comments>
		<pubDate>Wed, 15 Dec 2010 09:24:24 +0000</pubDate>
		<dc:creator>ahp2009</dc:creator>
				<category><![CDATA[mysql_replication]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://ahp2009.wordpress.com/?p=336</guid>
		<description><![CDATA[Today our MySQL Master tracking db went down (due to host server crashing) which consequently screwed up the slave. Here are the steps I took to fix it. Firstly, check the slave status with: show slave status\G; If the slave is reporting something like ”Last_Error: Error Duplicate entry replication”, this can be fixed by the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahp2009.wordpress.com&amp;blog=8068052&amp;post=336&amp;subd=ahp2009&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } 		H2 { margin-bottom: 0.21cm } 		H2.cjk { font-family: "DejaVu Sans" } 		H2.ctl { font-family: "Tahoma" } 		A:link { so-language: zxx } --></p>
<h2><span style="color:#000080;"><span style="text-decoration:underline;"><a href="http://www.pyrosoft.co.uk/blog/2006/10/10/fixing-mysql-replication-with-duplicate-key-error/"><br />
</a></span></span></h2>
<p>Today our MySQL Master tracking db went down (due to host server crashing) which consequently screwed up the slave. Here are the steps I took to fix it.<br />
Firstly, check the slave status with:</p>
<pre> show slave status\G;</pre>
<p>If the slave is reporting something like ”Last_Error: Error Duplicate entry replication”, this can be fixed by the following:</p>
<pre> stop slave;
 set global sql_slave_skip_counter=1;(IT AVOID ONE ERROR)
 start slave;
 show slave status\G;</pre>
<p>It will take some time after issuing those commands for the slave to rebuild itself from the master, but you can check the progress by querying the db to see what record we are up to, for example:</p>
<pre> connect trackdb;
 SELECT * FROM `track` WHERE 1 ORDER BY id DESC LIMIT 10;</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ahp2009.wordpress.com/336/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ahp2009.wordpress.com/336/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ahp2009.wordpress.com/336/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ahp2009.wordpress.com/336/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ahp2009.wordpress.com/336/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ahp2009.wordpress.com/336/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ahp2009.wordpress.com/336/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ahp2009.wordpress.com/336/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ahp2009.wordpress.com/336/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ahp2009.wordpress.com/336/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ahp2009.wordpress.com/336/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ahp2009.wordpress.com/336/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ahp2009.wordpress.com/336/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ahp2009.wordpress.com/336/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahp2009.wordpress.com&amp;blog=8068052&amp;post=336&amp;subd=ahp2009&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ahp2009.wordpress.com/2010/12/15/fixing-mysql-replication-with-duplicate-key-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2765ddd042bc8fc7d4b46ec42aed3427?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ahp2009</media:title>
		</media:content>
	</item>
		<item>
		<title>How To configure MySQL Replication</title>
		<link>http://ahp2009.wordpress.com/2010/12/15/how-to-configure-mysql-replication/</link>
		<comments>http://ahp2009.wordpress.com/2010/12/15/how-to-configure-mysql-replication/#comments</comments>
		<pubDate>Wed, 15 Dec 2010 08:59:38 +0000</pubDate>
		<dc:creator>ahp2009</dc:creator>
				<category><![CDATA[mysql_replication]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://ahp2009.wordpress.com/?p=332</guid>
		<description><![CDATA[a) You must have 2 servers(primery/secondary) running MySQL b) There will be 2 configurations one for primery and another one for secondary. $$$$$$$$$$$$$     Primery Server(  Master Side)  $$$$$$$$$$$$$ 1) Edit /etc/hosts.allow and add this line ( you MUST change this IP’s for yours !! ) Mysql : 10.0.0.1 2) Edit   /etc/mysql/my.cnf or /etc/my.cnf $$$$$$$$$$$$$$$ Comment [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahp2009.wordpress.com&amp;blog=8068052&amp;post=332&amp;subd=ahp2009&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } 		H1 { margin-bottom: 0.21cm } 		H1.western { font-family: "Times New Roman", serif } 		H1.cjk { font-family: "DejaVu Sans" } 		H1.ctl { font-family: "Tahoma" } 		H3 { margin-bottom: 0.21cm } 		A:link { so-language: zxx } --><br />
a) You must have 2 servers(primery/secondary) running MySQL<br />
b) There will be 2 configurations one for primery and another one for secondary.</p>
<p><em><span style="font-size:medium;"><strong>$$$$$$$$$$$$$     Primery Server(  Master Side)  $$$$$$$$$$$$$<br />
</strong></span></em></p>
<p>1) Edit /etc/hosts.allow and add this line ( you MUST change this IP’s for yours !! )</p>
<p>Mysql : 10.0.0.1</p>
<p>2) Edit   /etc/mysql/my.cnf or /etc/my.cnf<br />
<code><br />
$$$$$$$$$$$$$$$ Comment this below lines $$$$$$$$$$$$$$$$<br />
bind-address = xxx.xxx.xxx.xxx<br />
skip-networking<br />
####### Make sure this lines exists in the [mysqld] Section:<br />
log-bin=mysql-bin</code></p>
<p><code>binlog-do-db=database1</code></p>
<p><code>binlog-do-db=database2</code></p>
<p><code>etc.,<br />
server-id = 1</code></p>
<p>3) Now lets move to mysql using a power user like root xD<br />
<code><br />
mysql&gt; GRANT ALL ON databasename.* TO repl@'%' IDENTIFIED BY 'put_some_pass_here';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; GRANT REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO repl@'%' IDENTIFIED BY 'put_some_pass_here';</code></p>
<p><a name="more-112"></a>4) restart MySQL service</p>
<p><em><span style="font-size:large;"><strong>$$$$$$$$$$$$$$$$   Client Side </strong></span></em><span style="font-size:large;"><strong>$$$$$$$$$$$$$$</strong></span></p>
<p><span style="font-size:large;"><strong><br />
</strong></span>5) Edit my.cnf …. In my case located at: /etc/my.cnf<br />
* I’m going to show just a what you need the my.cnf file contains much more info.<br />
<code><br />
#### Add this lines or modify them<br />
log-bin=SOME_NAME-relay-bin<br />
server-id = 2<br />
#### This number increases when you add more than one SLAVE os CLIENT to the MASTER server<br />
master-host = 192.168.50.8<br />
#### Put the Hostname or IP from your MASTER server<br />
master-user = repl<br />
master-password = put_some_pass_here<br />
replicate-do-db=databasename1</code></p>
<p><code>replicate-do-db=databasename2</code></p>
<p>save and close the file.</p>
<p>you have to run this query to set the SLAVE. Before execute the query. you have to check  the MASTER_LOG_FILE and MASTER_LOG_POS in master log(<code>mysql&gt; show master status\G)</code>of primary server</p>
<p>mysql -u root -p</p>
<p>mysql&gt; CHANGE MASTER TO MASTER_HOST=’Ip_of_your_master’, MASTER_USER=’repl’, MASTER_PASSWORD=’some_password’, MASTER_LOG_FILE=’mysql-bin.000001′, MASTER_LOG_POS=345;</p>
<p>6) restart the service</p>
<p>7) done !! all data will be Replicated.</p>
<p><strong>Troubleshooting</strong>:<br />
<code><strong>Master:</strong></code></p>
<p><code><br />
mysql&gt; SHOW GRANTS FOR repl;<br />
mysql&gt; SHOW MASTER LOGS \G<br />
mysql&gt; SHOW BINARY LOGS;<br />
mysql&gt; SHOW MASTER STATUS;<br />
mysql&gt; RESET MASTER   ==&gt; CAUTON !!!</code></p>
<p><!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } --><code>mysql&gt; show master status\G</code></p>
<p><code>*************************** 1. row ***************************</code></p>
<p><code> File: mysql-bin.000002</code></p>
<p><code> Position: 106</code></p>
<p><code> Binlog_Do_DB: opt</code></p>
<p><code>Binlog_Ignore_DB: </code></p>
<p><code>1 row in set (0.00 sec)</code></p>
<p><code>mysql&gt; show processlist;</code></p>
<p><code>+-----+------------+------------------+------+-------------+------+----------------------------------------------------------------+------------------+</code></p>
<p><code>| Id  | User       | Host             | db   | Command     | Time | State                                                          | Info             |</code></p>
<p><code>+-----+------------+------------------+------+-------------+------+----------------------------------------------------------------+------------------+</code></p>
<p><code>| 242 | root       | localhost        | NULL | Query       |    0 | NULL                                                           | show processlist |</code></p>
<p><code>| 244 | slave_user | 10.0.9.242:37546 | NULL | Binlog Dump |  250 | Has sent all binlog to slave; waiting for binlog to be updated | NULL             |</code></p>
<p><code>+-----+------------+------------------+------+-------------+------+----------------------------------------------------------------+------------------+</code></p>
<p><code>2 rows in set (0.00 sec)</code></p>
<p><code><strong>SLAVE:</strong></code></p>
<p><code><br />
mysql&gt; SHOW SLAVE STATUS;<br />
mysql&gt; STOP SLAVE;<br />
mysql&gt; START SLAVE;<br />
mysql&gt; RESET SLAVE; ==&gt; CAUTON !!!</code></p>
<p><!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } --><code>mysql&gt; show processlist;</code></p>
<p><code>+----+-------------+-----------+------+---------+------+-----------------------------------------------------------------------+------------------+</code></p>
<p><code>| Id | User        | Host      | db   | Command | Time | State                                                                 | Info             |</code></p>
<p><code>+----+-------------+-----------+------+---------+------+-----------------------------------------------------------------------+------------------+</code></p>
<p><code>| 46 | root        | localhost | NULL | Query   |    0 | NULL                                                                  | show processlist |</code></p>
<p><code>| 47 | system user |           | NULL | Connect |  276 | Waiting for master to send event                                      | NULL             |</code></p>
<p><code>| 48 | system user |           | NULL | Connect |  270 | Has read all relay log; waiting for the slave I/O thread to update it | NULL             |</code></p>
<p><code>+----+-------------+-----------+------+---------+------+-----------------------------------------------------------------------+------------------+</code></p>
<p><code>3 rows in set (0.02 sec)</code></p>
<p><code>---------------------------------------------<br />
</code></p>
<p>mysql&gt; show slave status\G</p>
<p>or <code>SHOW SLAVE STATUS;</code></p>
<p>*************************** 1. row ***************************</p>
<p>Slave_IO_State: Waiting for master to send event</p>
<p>Master_Host: 10.0.9.251</p>
<p>Master_User: slave_user</p>
<p>Master_Port: 3306</p>
<p>Connect_Retry: 60</p>
<p>Master_Log_File: mysql-bin.000002</p>
<p>Read_Master_Log_Pos: 106</p>
<p>Relay_Log_File: tnqt111-relay-bin.000004</p>
<p>Relay_Log_Pos: 251</p>
<p>Relay_Master_Log_File: mysql-bin.000002</p>
<p>Slave_IO_Running: Yes</p>
<p>Slave_SQL_Running: Yes</p>
<p>Replicate_Do_DB: opt</p>
<p>Replicate_Ignore_DB:</p>
<p>Replicate_Do_Table:</p>
<p>Replicate_Ignore_Table:</p>
<p>Replicate_Wild_Do_Table:</p>
<p>Replicate_Wild_Ignore_Table:</p>
<p>Last_Errno: 0</p>
<p>Last_Error:</p>
<p>Skip_Counter: 0</p>
<p>Exec_Master_Log_Pos: 106</p>
<p>Relay_Log_Space: 553</p>
<p>Until_Condition: None</p>
<p>Until_Log_File:</p>
<p>Until_Log_Pos: 0</p>
<p>Master_SSL_Allowed: No</p>
<p>Master_SSL_CA_File:</p>
<p>Master_SSL_CA_Path:</p>
<p>Master_SSL_Cert:</p>
<p>Master_SSL_Cipher:</p>
<p>Master_SSL_Key:</p>
<p>Seconds_Behind_Master: 0</p>
<p>Master_SSL_Verify_Server_Cert: No</p>
<p>Last_IO_Errno: 0</p>
<p>Last_IO_Error:</p>
<p>Last_SQL_Errno: 0</p>
<p>Last_SQL_Error:</p>
<p>1 row in set (0.01 sec)</p>
<p><strong>#######You can load the data(tables,data,etc., from databases),while u use the below command</strong></p>
<p><strong>Error1 :</strong></p>
<p><code>mysql&gt; LOAD DATA FROM MASTER;<br />
ERROR 1219 (HY000): Error running query on master: Access denied; you need the RELOAD privilege for this operation<br />
////////// IF YOU SEE THIS in SLAVE side .... Type This NEXT in the MASTER SERVER:<br />
</code></p>
<p><code>mysql&gt; GRANT RELOAD on *.* to repl@'%' identified by 'your_password';<br />
OR<br />
mysql&gt; GRANT SUPER on *.* to repl@'%' identified by 'your_password';</code></p>
<p><strong>Error2:</strong></p>
<p><span style="font-size:medium;">mysql&gt;load data from master;</span></p>
<p><span style="font-size:medium;">While u will use the above command,u may got below error:</span></p>
<p><span style="font-size:medium;"><strong>Error 1189 (08S01): Net error reading from master</strong></span></p>
<h3>Discussion Discussion</h3>
<p>This error can happen while executing the <tt>LOAD DATA FROM MASTER</tt> statement because of a couple of reasons. It could happen if a non-MyISAM table was loaded. <tt>LOAD DATA FROM MASTER</tt> works only with MyISAM engine. It can also happen if a recoverable network error occurs. This error can happen while executing the <tt>LOAD DATA FROM MASTER</tt> statement because of a couple of reasons. It could happen if a non-MyISAM table was loaded. <tt>LOAD DATA FROM MASTER</tt> works only with MyISAM engine. It can also happen if a recoverable network error occurs.</p>
<h3>Solution</h3>
<p>If this error is thrown, make sure all tables on the master are MyISAM. If so, retry running the SQL statement. In case of databases containing InnoDB tables or other engines, use <tt>mysqldump</tt> for slave initialization. If this error is thrown, make sure all tables on the master are MyISAM. If so, retry running the SQL statement. In case of databases containing InnoDB tables or other engines, use <tt>mysqldump</tt> for slave initialization.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ahp2009.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ahp2009.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ahp2009.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ahp2009.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ahp2009.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ahp2009.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ahp2009.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ahp2009.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ahp2009.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ahp2009.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ahp2009.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ahp2009.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ahp2009.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ahp2009.wordpress.com/332/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahp2009.wordpress.com&amp;blog=8068052&amp;post=332&amp;subd=ahp2009&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ahp2009.wordpress.com/2010/12/15/how-to-configure-mysql-replication/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2765ddd042bc8fc7d4b46ec42aed3427?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ahp2009</media:title>
		</media:content>
	</item>
		<item>
		<title>Change eth1 to eth0</title>
		<link>http://ahp2009.wordpress.com/2010/12/13/change-eth0-to-eth1/</link>
		<comments>http://ahp2009.wordpress.com/2010/12/13/change-eth0-to-eth1/#comments</comments>
		<pubDate>Mon, 13 Dec 2010 11:33:14 +0000</pubDate>
		<dc:creator>ahp2009</dc:creator>
				<category><![CDATA[network]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://ahp2009.wordpress.com/?p=327</guid>
		<description><![CDATA[We need to edit from NAME="eth1" to "eth0" in this file: vim /etc/udev/rules.d/70-persitent-net.rules # PCI device 0x1022:0x2000 (pcnet32) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:bf:c8:1b", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1" To # PCI device 0x1022:0x2000 (pcnet32) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:bf:c8:1b", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" Also we need to edit change the eth1 to eth0 in the /etc/network/interfaces and reboot the server. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahp2009.wordpress.com&amp;blog=8068052&amp;post=327&amp;subd=ahp2009&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } --><tt><span style="color:#1a1a1a;">We need to edit from NAME="eth1" to "eth0" in this file:</span></tt></p>
<p><tt><span style="color:#1a1a1a;">vim /etc/udev/rules.d/70-persitent-net.rules</span></tt></p>
<p><tt><span style="color:#1a1a1a;"># PCI device 0x1022:0x2000 (pcnet32)</span></tt><br />
<tt><span style="color:#1a1a1a;">SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",</span></tt><br />
<tt><span style="color:#1a1a1a;">ATTR{address}=="00:0c:29:bf:c8:1b", ATTR{type}=="1", KERNEL=="eth*",</span></tt><br />
<tt><span style="color:#1a1a1a;"><span style="font-size:large;"><strong>NAME="eth1" </strong></span></span></tt></p>
<p><tt><span style="color:#1a1a1a;"> To </span></tt></p>
<p><tt><span style="color:#1a1a1a;"># PCI device 0x1022:0x2000 (pcnet32)</span></tt><br />
<tt><span style="color:#1a1a1a;">SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",</span></tt><br />
<tt><span style="color:#1a1a1a;">ATTR{address}=="00:0c:29:bf:c8:1b", ATTR{type}=="1", KERNEL=="eth*",</span></tt><br />
<tt><span style="color:#1a1a1a;"><span style="font-size:large;"><strong>NAME="eth0"</strong></span></span></tt></p>
<p><tt><span style="color:#1a1a1a;">Also we need to edit change the eth1 to eth0 in</span></tt><br />
<tt><span style="color:#1a1a1a;">the /etc/network/interfaces</span></tt><br />
<tt><span style="color:#1a1a1a;">and reboot the server.</span></tt><br />
<tt><span style="color:#1a1a1a;">After that eth0 is enabled </span></tt></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ahp2009.wordpress.com/327/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ahp2009.wordpress.com/327/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ahp2009.wordpress.com/327/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ahp2009.wordpress.com/327/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ahp2009.wordpress.com/327/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ahp2009.wordpress.com/327/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ahp2009.wordpress.com/327/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ahp2009.wordpress.com/327/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ahp2009.wordpress.com/327/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ahp2009.wordpress.com/327/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ahp2009.wordpress.com/327/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ahp2009.wordpress.com/327/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ahp2009.wordpress.com/327/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ahp2009.wordpress.com/327/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ahp2009.wordpress.com&amp;blog=8068052&amp;post=327&amp;subd=ahp2009&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ahp2009.wordpress.com/2010/12/13/change-eth0-to-eth1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2765ddd042bc8fc7d4b46ec42aed3427?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ahp2009</media:title>
		</media:content>
	</item>
	</channel>
</rss>
