<?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>LifeUML &#187; TuyenT</title>
	<atom:link href="http://lifeuml.com/author/admin/feed/" rel="self" type="application/rss+xml" />
	<link>http://lifeuml.com</link>
	<description>from actor, to actors..</description>
	<lastBuildDate>Fri, 28 Aug 2009 10:17:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Convert MySQL charset from latin1 to utf8</title>
		<link>http://lifeuml.com/convert-mysql-charset-from-latin1-to-utf8/</link>
		<comments>http://lifeuml.com/convert-mysql-charset-from-latin1-to-utf8/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 10:17:35 +0000</pubDate>
		<dc:creator>TuyenT</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://lifeuml.com/?p=113</guid>
		<description><![CDATA[What you need:
- DBConvert for MS Access and MySQL 6.2.1: here
- Translator tool: DbfontConvert (Vietfont converter for database): here
]]></description>
			<content:encoded><![CDATA[<p>What you need:<br />
- DBConvert for MS Access and MySQL 6.2.1: <a href="http://www.warez-bb.org/viewtopic.php?t=1036942" target="_blank">here</a><br />
- Translator tool: DbfontConvert (Vietfont converter for database): <a href="http://forums.congdongcviet.com/showthread.php?t=2730" target="_blank">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lifeuml.com/convert-mysql-charset-from-latin1-to-utf8/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Prevent Toshiba Flash Cards run at startup</title>
		<link>http://lifeuml.com/prevent-toshiba-flash-cards-run-at-startup/</link>
		<comments>http://lifeuml.com/prevent-toshiba-flash-cards-run-at-startup/#comments</comments>
		<pubDate>Sat, 04 Jul 2009 17:54:45 +0000</pubDate>
		<dc:creator>TuyenT</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://lifeuml.com/?p=111</guid>
		<description><![CDATA[Reference: NoteBookReview
I got this info about the program in case it&#8217;s any help. I&#8217;m in the new Vista version of MSConfig and the button used to disable this thing at boot is greyed out
File Name: TCrdMain.exe
Display Name: TOSHIBA Flash Cards
Description: TOSHIBA Flash Cards
Publisher: TOSHIBA Corporation
Digitally Signed By: VeriSign Class 3 Code Signing 2004 CA
File Type: [...]]]></description>
			<content:encoded><![CDATA[<p>Reference: <a href="http://forum.notebookreview.com/showthread.php?t=130478" target="_blank">NoteBookReview</a></p>
<blockquote><p>I got this info about the program in case it&#8217;s any help. I&#8217;m in the new Vista version of MSConfig and the button used to disable this thing at boot is greyed out</p>
<p>File Name: TCrdMain.exe<br />
Display Name: TOSHIBA Flash Cards<br />
Description: TOSHIBA Flash Cards<br />
Publisher: TOSHIBA Corporation<br />
Digitally Signed By: VeriSign Class 3 Code Signing 2004 CA<br />
File Type: Application<br />
Startup Value: C:\Program Files\TOSHIBA\FlashCards\TCrdMain.exe<br />
File Path: C:\Program Files\TOSHIBA\FlashCards\TCrdMain.exe<br />
File Size: 530552<br />
File Version: 1.0.0.7<br />
Date Installed: 11/12/2006 18:27:12<br />
Startup Type: Registry: Local Machine<br />
Location: Software\Microsoft\Windows\CurrentVersion\Run<br />
Classification: Permitted<br />
Ships with Operating System: No<br />
SpyNet Voting: Not applicable</p>
<p>&#8230;&#8230;.</p>
<p>OK, for some reason the disable button is lit up now, I&#8217;ve disabled it, rebooted and I&#8217;m happy to say I&#8217;ve solved the problem. The instrcutions from star to finish (in Vista) are:</p>
<p>Click Start<br />
Click on Control Panel (make sure there&#8217;s a dot next to &#8220;Control Panel Home&#8221; on the left hand side of the Control Panel window)<br />
Click &#8220;Change Startup Programs&#8221; (Under Programs)<br />
Change the Category drop-down menu to &#8220;Startup Programs&#8221;<br />
Scroll down the list until you see Toshiba Flash Cards under the Toshiba Corporation heading, then click on it<br />
Click the Disable button at the bottom-right of the window<br />
Reboot<br />
Login<br />
Press Fn+F6<br />
Breathe deep sigh of relief<br />
Go to bed</p>
<p>Spiderpig, spiderpig, does whatever a spiderpig does&#8230;.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://lifeuml.com/prevent-toshiba-flash-cards-run-at-startup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding/Removing Shell scripts</title>
		<link>http://lifeuml.com/addingremoving-shell-scripts/</link>
		<comments>http://lifeuml.com/addingremoving-shell-scripts/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 09:57:30 +0000</pubDate>
		<dc:creator>TuyenT</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[add]]></category>
		<category><![CDATA[remove]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[start up]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://lifeuml.com/?p=100</guid>
		<description><![CDATA[Original Post From: StringOfThoughts
Adding a script
First of all write a script, say test.sh and put it in the directory /etc/init.d . Next we need to make it executable so.

$ sudo chmod +x test.sh

You can check if the script is working by issuing

$ sudo ./test.sh

Assuming the script is working as expected, to make the script run [...]]]></description>
			<content:encoded><![CDATA[<p>Original Post From: <a href="http://stringofthoughts.wordpress.com/2009/04/16/adding-removing-shell-scripts-ubuntu-810/" target="_blank">StringOfThoughts</a></p>
<p><strong>Adding a script</strong></p>
<p>First of all write a script, say test.sh and put it in the directory /etc/init.d . Next we need to make it executable so.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> +x test.sh</pre></div></div>

<p>You can check if the script is working by issuing</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> .<span style="color: #000000; font-weight: bold;">/</span>test.sh</pre></div></div>

<p>Assuming the script is working as expected, to make the script run at startup / reboot.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> update-rc.d <span style="color: #660033;">-f</span> test.sh start <span style="color: #000000;">99</span> <span style="color: #000000;">2</span> <span style="color: #000000;">3</span> <span style="color: #000000;">4</span> <span style="color: #000000;">5</span> . <span style="color: #000000; font-weight: bold;">//</span> Run at startup
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> update-rc.d <span style="color: #660033;">-f</span> test.sh start <span style="color: #000000;">1</span> <span style="color: #000000;">0</span> <span style="color: #000000;">6</span> .      <span style="color: #000000; font-weight: bold;">//</span> Run at reboot</pre></div></div>

<p>Just <strong>a reminder there is dot (.)</strong> at the end of command.  Don’t forget that!! Now you are done adding a script to run at startup.</p>
<p><strong>Removing a script.</strong></p>
<p>Just a reminder for new users, don’t just go to /etc/init.d and delete the script file <img src='http://lifeuml.com/smilies/yahoo_smiley.gif' alt='&#58;&#41;' class='wp-smiley' width='18' height='18' title='&#58;&#41;' /> that wouldn’t help and may cause you trouble. We need a nice little application called rcconf (Debian runlevel configuration tool)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> rcconf</pre></div></div>

<p>then run rcconf (only root can run rcconf)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> rcconf</pre></div></div>

<p><img class="aligncenter size-full wp-image-101" title="rcconf1" src="http://lifeuml.com/wp-content/uploads/2009/06/rcconf1.jpg" alt="rcconf1" width="300" height="188" /></p>
<p>The interface is very simple. It lists the scripts so all you need to do is find out where is your script and toggle “*” using space bar  and then select OK. That’s all. The script is now removed but still present in the directory /etc/init.d but you can safely delete it now.</p>
<p><em><strong>Bonus:</strong></em> My shell script to launch JasperServer at start up:</p>

<div class="wp_syntax"><div class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #008000;">#!/bin/sh</span>
<span style="color: pink;">/</span>opt<span style="color: pink;">/</span>jasperserver<span style="color: pink;">-</span><span style="color: #000000;">3.1</span><span style="color: pink;">/</span>jasperctl.sh start</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://lifeuml.com/addingremoving-shell-scripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Virtual CD/DVD Driver in Ubuntu</title>
		<link>http://lifeuml.com/virtual-cddvd-driver-in-ubuntu/</link>
		<comments>http://lifeuml.com/virtual-cddvd-driver-in-ubuntu/#comments</comments>
		<pubDate>Sat, 20 Jun 2009 02:40:19 +0000</pubDate>
		<dc:creator>TuyenT</dc:creator>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[AcetoneISO]]></category>
		<category><![CDATA[CD]]></category>
		<category><![CDATA[DVD]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Virtual]]></category>

		<guid isPermaLink="false">http://lifeuml.com/?p=91</guid>
		<description><![CDATA[Do you want a virtual CD/DVD software like MagicDisc or DAEMON Tools in Windows for your Ubuntu/Linux machine? I can introduce you an acceptable (and free) one: AcetoneISO

AcetoneISO, is a feature-rich and complete software application to manage CD/DVD images. Thanks to powerful open source tools such as fuseiso, AcetoneISO will let You mount typical proprietary [...]]]></description>
			<content:encoded><![CDATA[<p>Do you want a virtual CD/DVD software like <a href="http://www.magiciso.com/tutorials/miso-magicdisc-overview.htm" target="_blank">MagicDisc</a> or <a href="http://www.daemon-tools.cc/eng/home" target="_blank">DAEMON Tools</a> in Windows for your Ubuntu/Linux machine? I can introduce you an acceptable (and free) one: <a href="http://www.acetoneteam.org/" target="_blank">AcetoneISO</a></p>
<p style="text-align: center;"><img class="aligncenter size-medium wp-image-93" title="AcetoneISO" src="http://lifeuml.com/wp-content/uploads/2009/06/AcetoneISO-300x151.png" alt="AcetoneISO" width="300" height="151" /></p>
<blockquote><p>AcetoneISO, is a feature-rich and complete software application to manage CD/DVD images. Thanks to powerful open source tools such as fuseiso, AcetoneISO will let You mount typical proprietary images formats of the Windows world such as ISO BIN NRG MDF IMG and do plenty of other things.</p>
<p>- From AcetoneISO Homepage</p></blockquote>
<p>The use of AcetoneISO is pretty easy and much similar to DAEMON Tools. Just give AcetoneISO a try, and save time of burning a CD/DVD <img src='http://lifeuml.com/smilies/yahoo_smiley.gif' alt='&#58;&#41;' class='wp-smiley' width='18' height='18' title='&#58;&#41;' /></p>
<p>P/S: By the way, you can find some interesting information of how to mount a ISO file at <a href="http://ubuntuforums.org/showthread.php?t=529581" target="_blank">UbuntuForums</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://lifeuml.com/virtual-cddvd-driver-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pidgin cannot connect to Yahoo?</title>
		<link>http://lifeuml.com/pidgin-cannot-connect-to-yahoo/</link>
		<comments>http://lifeuml.com/pidgin-cannot-connect-to-yahoo/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 07:50:38 +0000</pubDate>
		<dc:creator>TuyenT</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[connect]]></category>
		<category><![CDATA[establish]]></category>
		<category><![CDATA[Pidgin]]></category>
		<category><![CDATA[resolving]]></category>
		<category><![CDATA[Yahoo]]></category>

		<guid isPermaLink="false">http://lifeuml.com/?p=86</guid>
		<description><![CDATA[Original Post From: prash-babu.com
In case you use Yahoo with Pidgin, you may sometimes find this error saying &#8220;Could not establish a connection with the server: Error resolving scs.msg.yahoo.com. Name or service not known&#8221;. Sometimes trying to connect multiple times may solve the issue, but sometimes it may never connect. Now this can get very irritating, [...]]]></description>
			<content:encoded><![CDATA[<p>Original Post From: <a href="http://www.prash-babu.com/2008/11/how-to-fix-pidgin-yahoo-error-could-not.html" target="_blank">prash-babu.com</a></p>
<p>In case you use Yahoo with Pidgin, you may sometimes find this error saying &#8220;Could not establish a connection with the server: Error resolving scs.msg.yahoo.com. Name or service not known&#8221;. Sometimes trying to connect multiple times may solve the issue, but sometimes it may never connect. Now this can get very irritating, so there is a fix for it. If you carefully look at the error, it says &#8220;Error resolving ..&#8221;. Now this is mostly some communication problem with the pager server scs.msg.yahoo.com. So the fix is like this :</p>
<p><strong>Step 1:</strong> Open Pidgin, then go to Accounts -&gt; Add/Edit (or just press Ctrl+A)</p>
<p><strong>Step 2:</strong> Then select your Yahoo account and Click on Modify</p>
<p><img class="aligncenter size-full wp-image-87" title="Step2" src="http://lifeuml.com/wp-content/uploads/2009/06/PYStep2.png" alt="Step2" width="520" height="321" /></p>
<p><strong>Step 3:</strong> Then Go to Advanced</p>
<p><strong>Step 4:</strong> Now under Pager Server, replace <em>scs.msg.yahoo.com</em> with <em>66.163.181.166</em> or <em>66.163.181.173</em>.</p>
<p><img class="aligncenter size-full wp-image-88" title="Step4" src="http://lifeuml.com/wp-content/uploads/2009/06/PYStep4.png" alt="Step4" width="463" height="546" /></p>
<p>This ip you get when you ping scs.msg.yahoo.com</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">ping</span> scs.msg.yahoo.com
PING scs.msg.yahoo.com <span style="color: #7a0874; font-weight: bold;">&#40;</span>66.163.181.166<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000;">56</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">84</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> bytes of data.
<span style="color: #000000;">64</span> bytes from cs101.msg.mud.yahoo.com <span style="color: #7a0874; font-weight: bold;">&#40;</span>66.163.181.166<span style="color: #7a0874; font-weight: bold;">&#41;</span>: <span style="color: #007800;">icmp_seq</span>=<span style="color: #000000;">1</span> <span style="color: #007800;">ttl</span>=<span style="color: #000000;">52</span> <span style="color: #007800;"><span style="color: #000000; font-weight: bold;">time</span></span>=<span style="color: #000000;">321</span> ms
<span style="color: #000000;">64</span> bytes from cs101.msg.mud.yahoo.com <span style="color: #7a0874; font-weight: bold;">&#40;</span>66.163.181.166<span style="color: #7a0874; font-weight: bold;">&#41;</span>: <span style="color: #007800;">icmp_seq</span>=<span style="color: #000000;">2</span> <span style="color: #007800;">ttl</span>=<span style="color: #000000;">51</span> <span style="color: #007800;"><span style="color: #000000; font-weight: bold;">time</span></span>=<span style="color: #000000;">320</span> ms
<span style="color: #000000;">64</span> bytes from cs101.msg.mud.yahoo.com <span style="color: #7a0874; font-weight: bold;">&#40;</span>66.163.181.166<span style="color: #7a0874; font-weight: bold;">&#41;</span>: <span style="color: #007800;">icmp_seq</span>=<span style="color: #000000;">3</span> <span style="color: #007800;">ttl</span>=<span style="color: #000000;">52</span> <span style="color: #007800;"><span style="color: #000000; font-weight: bold;">time</span></span>=<span style="color: #000000;">323</span> ms</pre></div></div>

<p><strong>Step 5:</strong> Now click on Save and and Enable Your yahoo account again, this time you hopefully should be able to connect. In case you still cant try the second, i have mentioned 2 IPs.</p>
<p><strong>Note:</strong> Basically what you are doing is directly providing the IP address of scs.msg.yahoo.com thereby saving time and the need to resolve scs.msg.yahoo.com.</p>
<blockquote><p><strong>Update:</strong> If the above instruction doesn&#8217;t work with you, try to update your Pidgin version. You can check out <a href="http://getdeb.net">getdeb.net</a> or <a href="http://launchpad.net">launchpad.net</a> for the newest one.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://lifeuml.com/pidgin-cannot-connect-to-yahoo/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to view .CHM files in Ubuntu</title>
		<link>http://lifeuml.com/how-to-view-chm-files-in-ubuntu/</link>
		<comments>http://lifeuml.com/how-to-view-chm-files-in-ubuntu/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 00:00:57 +0000</pubDate>
		<dc:creator>TuyenT</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[CHM]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://lifeuml.com/?p=83</guid>
		<description><![CDATA[Original Post From: GiannisTsakiris.com
It is easy to open and view Microsoft Compiled HTML Help files (.chm) from Ubuntu. You actually have at least two options: xchm or gnochm.
To install xchm run the following command:

$ sudo apt-get install xchm

To install gnochm run:

$ sudo apt-get install gnochm

To view a .chm file using xchm you just have to [...]]]></description>
			<content:encoded><![CDATA[<p>Original Post From:<a href="http://www.giannistsakiris.com/index.php/2007/11/16/how-to-view-chm-files-in-ubuntu/"> GiannisTsakiris.com</a></p>
<p>It is easy to open and view Microsoft Compiled HTML Help files (.chm) from Ubuntu. You actually have at least two options: xchm or gnochm.</p>
<p>To install <em>xchm</em> run the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> xchm</pre></div></div>

<p>To install <em>gnochm</em> run:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> gnochm</pre></div></div>

<p>To view a .chm file using xchm you just have to run:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ xchm chm-file</pre></div></div>

<p>Alternative to open it with gnochm simply run:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ gnochm chm-file</pre></div></div>

<p>Or in a simplier way,  you can just double-click on the file&#8217;s icon. </p>
]]></content:encoded>
			<wfw:commentRss>http://lifeuml.com/how-to-view-chm-files-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL error 1045 (28000): Access denied for user &#8230;</title>
		<link>http://lifeuml.com/mysql-error-1045-28000-access-denied-for-user/</link>
		<comments>http://lifeuml.com/mysql-error-1045-28000-access-denied-for-user/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 04:11:58 +0000</pubDate>
		<dc:creator>TuyenT</dc:creator>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Access denined]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[permission]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://lifeuml.com/?p=77</guid>
		<description><![CDATA[Hello everybody,
Today, my task is configuring a MySQL server to allow connections from remote computers. The problem I has met is that although port 3306 on the router was already opened, users from internet still could not connect to my MySQL Server. Here is my error message:

tuyent@local:~$ mysql -u tuyent -p -h remote-computer
Enter password: 
ERROR [...]]]></description>
			<content:encoded><![CDATA[<p>Hello everybody,</p>
<p>Today, my task is configuring a MySQL server to allow connections from remote computers. The problem I has met is that although port 3306 on the router was already opened, users from internet still could not connect to my MySQL Server. Here is my error message:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">tuyent<span style="color: #000000; font-weight: bold;">@</span><span style="color: #7a0874; font-weight: bold;">local</span>:~$ mysql <span style="color: #660033;">-u</span> tuyent <span style="color: #660033;">-p</span> <span style="color: #660033;">-h</span> remote-computer
Enter password: 
ERROR <span style="color: #000000;">1045</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">28000</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>: Access denied <span style="color: #000000; font-weight: bold;">for</span> user <span style="color: #ff0000;">'tuyent'</span><span style="color: #000000; font-weight: bold;">@</span><span style="color: #ff0000;">'local'</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>using password: YES<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>Well, here is my solution:<br />
- <strong>Step 1:</strong> Double check that the port 3306 is already opened.<br />
- <strong>Step 2:</strong> Open MySQL configuration file (/etc/mysql/my.cnf), comment the line</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># bind-address            = 127.0.0.1</span></pre></div></div>

<p>- <strong>Step 3:</strong> Restart the MySQL server</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>mysql restart</pre></div></div>

<p>- <strong>Step 4:</strong> Go to mysql command line and grant permission for user</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysql<span style="color: #000000; font-weight: bold;">&gt;</span> grant all on <span style="color: #000000; font-weight: bold;">*</span>.<span style="color: #000000; font-weight: bold;">*</span> to <span style="color: #ff0000;">'tuyent'</span><span style="color: #000000; font-weight: bold;">@</span><span style="color: #ff0000;">'%'</span> identified by <span style="color: #ff0000;">'password'</span>;
mysql<span style="color: #000000; font-weight: bold;">&gt;</span> grant all on <span style="color: #000000; font-weight: bold;">*</span>.<span style="color: #000000; font-weight: bold;">*</span> to <span style="color: #ff0000;">'tuyent'</span><span style="color: #000000; font-weight: bold;">@</span><span style="color: #ff0000;">'localhost'</span> identified by <span style="color: #ff0000;">'password'</span>;
mysql<span style="color: #000000; font-weight: bold;">&gt;</span> flush privileges;</pre></div></div>

<p>Note: Remember to grant permission on both from localhost and from anywhere (&#8217;%&#8217; indicator), and flush all privileges.</p>
<p>Works fine for me <img src='http://lifeuml.com/smilies/yahoo_smiley.gif' alt='&#58;&#41;' class='wp-smiley' width='18' height='18' title='&#58;&#41;' /></p>
]]></content:encoded>
			<wfw:commentRss>http://lifeuml.com/mysql-error-1045-28000-access-denied-for-user/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Backing Up and Restoring MySQL Database with MySQL Commands</title>
		<link>http://lifeuml.com/backing-up-and-restoring-your-mysql-database/</link>
		<comments>http://lifeuml.com/backing-up-and-restoring-your-mysql-database/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 06:44:12 +0000</pubDate>
		<dc:creator>TuyenT</dc:creator>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Back up]]></category>
		<category><![CDATA[Command]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Restore]]></category>

		<guid isPermaLink="false">http://lifeuml.com/?p=67</guid>
		<description><![CDATA[Original post from: devshed.com
Do you need to change your web host or switch your database server? This is probably the only time when you really think of backing up your MySQL data. If you&#8217;ve got a website with a database or your custom database running for your applications, it is imperative that you make regular [...]]]></description>
			<content:encoded><![CDATA[<p>Original post from: <a href="http://www.devshed.com/c/a/MySQL/Backing-up-and-restoring-your-MySQL-Database/" target="_blank">devshed.com</a></p>
<p><strong>Do you need to change your web host or switch your database server? This is probably the only time when you really think of backing up your MySQL data. If you&#8217;ve got a website with a database or your custom database running for your applications, it is imperative that you make regular backups of the database.</strong></p>
<p>The easiest way to backup your database would be to telnet to the your database server machine and use the mysqldump command to dump your whole database to a backup file.</p>
<p><strong>Playing with mysqldump</strong></p>
<p>If you have either a shell or telnet access to your database server, you can backup the database using mysqldump. By default, the output of the command will dump the contents of the database in SQL statements to your console. This output can then be piped or redirected to any location you want. If you plan to backup your database, you can pipe the output to a sql file, which will contain the SQL statements to recreate and populate the database tables when you wish to restore your database. There are more adventurous ways to use the output of mysqldump.</p>
<p><strong>A Simple Database Backup:</strong></p>
<p>You can use mysqldump to create a simple backup of your database using the following syntax.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysqldump <span style="color: #660033;">-u</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>username<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #660033;">-p</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>password<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>databasename<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>backupfile.sql<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<ul>
<li>[username] &#8211; this is your database username</li>
<li>[password] &#8211; this is the password for your database</li>
<li>[databasename] &#8211; the name of your database</li>
<li>[backupfile.sql] &#8211; the file to which the backup should be written.</li>
</ul>
<p>The resultant dump file will contain all the SQL statements needed to create the table and populate the table in a new database server. To backup your database &#8216;Customers&#8217; with the username &#8217;sadmin&#8217; and password &#8216;pass21&#8242; to a file custback.sql, you would issue the command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysqldump <span style="color: #660033;">-u</span> sadmin <span style="color: #660033;">-p</span> pass21 Customers <span style="color: #000000; font-weight: bold;">&gt;</span> custback.sql</pre></div></div>

<p>You can also ask mysqldump to add a drop table command before every create command by using the option &#8211;add-drop-table. This option is useful if you would like to create a backup file which can rewrite an existing database without having to delete the older database manually first.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysqldump <span style="color: #660033;">--add-drop-table</span> <span style="color: #660033;">-u</span> sadmin <span style="color: #660033;">-p</span> pass21 Customers <span style="color: #000000; font-weight: bold;">&gt;</span> custback.sql</pre></div></div>

<p><strong>Backing up only specified tables</strong></p>
<p>If you&#8217;d like restrict the backup to only certain tables of your database, you can also specify the tables you want to backup. Let&#8217;s say that you want to backup only customer_master &amp; customer_details from the Customers database, you do that by issuing</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysqldump <span style="color: #660033;">--add-drop-table</span> <span style="color: #660033;">-u</span> sadmin <span style="color: #660033;">-p</span> pass21 Customers customer_master customer_details <span style="color: #000000; font-weight: bold;">&gt;</span> custback.sql</pre></div></div>

<p>So the syntax for the command to issue is:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysqldump <span style="color: #660033;">-u</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>username<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #660033;">-p</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>password<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>databasename<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>table1 table2 ....<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<ul>
<li>[tables] &#8211; This is a list of tables to backup. Each table is separated by a space.</li>
</ul>
<p><span id="more-67"></span></p>
<p><strong>What about Multiple Databases? </strong></p>
<p>If you are a database administrator who has to look after multiple databases, you&#8217;ll need to back up more than one database at a time. Here&#8217;s how you can backup multiple databases in one shot.</p>
<p>If you want to specify the databases to backup, you can use the &#8211;databases parameter followed by the list of databases you would like to backup. Each database name has to be separated by at least one space when you type in the command. So if you have to backup 3 databases, let say Customers, Orders and Comments, you can issue the following command to back them up. Make sure the username you specify has permissions to access the databases you would like to backup.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysqldump <span style="color: #660033;">-u</span> root <span style="color: #660033;">-p</span> pass21 <span style="color: #660033;">--databases</span> Customers Orders Comments <span style="color: #000000; font-weight: bold;">&gt;</span> multibackup.sql</pre></div></div>

<p>This is okay if you have a small set of databases you want to backup. Now how about backing up all the databases in the server? That&#8217;s an easy one, just use the &#8211;all-databases parameter to backup all the databases in the server in one step.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysqldump <span style="color: #660033;">--all-databases</span> <span style="color: #000000; font-weight: bold;">&gt;</span> alldatabases.sql</pre></div></div>

<p><strong>Backing up only the Database Structure</strong></p>
<p>Most developers need to backup only the database structure to while they are developing their applications. You can backup only the database structure by telling mysqldump not to back up the data. You can do this by using the &#8211;no-data parameter when you call mysqldump.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysqldump <span style="color: #660033;">--no-data</span> <span style="color: #660033;">--databases</span> Customers Orders Comments <span style="color: #000000; font-weight: bold;">&gt;</span> structurebackup.sql</pre></div></div>

<p><strong>Compressing your Backup file on the Fly</strong></p>
<p>Backups of databases take up a lot of space. You can compress the output of mysqldump to save valuable space while you&#8217;re backing up your databases. Since mysqldump sends its output to the console, we can pipe the output through gzip or bzip2 and send the compressed dump to the backup file. Here&#8217;s how you would do that with bzip2 and gzip respectively.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysqldump <span style="color: #660033;">--all-databases</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">bzip2</span> <span style="color: #660033;">-c</span> <span style="color: #000000; font-weight: bold;">&gt;</span> databasebackup.sql.bz2
mysqldump <span style="color: #660033;">--all-databases</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">gzip</span> <span style="color: #000000; font-weight: bold;">&gt;</span> databasebackup.sql.gz</pre></div></div>

<p><strong>A Shell Script for Automating Backups?</strong></p>
<p>You can automate the backup process by making a small shell script which will create a daily backup file. How do you get cron to back up your database without overwriting the older backup? You can use a tiny shell script to add the date to your backup file. An example of a shell script you could use is shown below.</p>

<div class="wp_syntax"><div class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #008000;">#!/bin/sh</span>
date<span style="color: pink;">=</span>`date <span style="color: pink;">-</span>I`
mysqldump <span style="color: pink;">--</span>all<span style="color: pink;">-</span>databases <span style="color: pink;">|</span> gzip <span style="color: pink;">&gt;</span> <span style="color: pink;">/</span>var<span style="color: pink;">/</span>backup<span style="color: pink;">/</span>backup<span style="color: pink;">-</span><span style="color: #800080;">$date</span>.sql.gz</pre></div></div>

<p><strong>Restore using mysql</strong></p>
<p>If you have to re-build your database from scratch, you can easily restore the mysqldump file by using the mysql command. This method is usually used to recreate or rebuild the database from scratch.</p>
<p>Here&#8217;s how you would restore your custback.sql file to the Customers database.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysql <span style="color: #660033;">-u</span> sadmin <span style="color: #660033;">-p</span> pass21 Customers <span style="color: #000000; font-weight: bold;">&lt;</span> custback.sql</pre></div></div>

<p>Easy isn&#8217;t it ? Here&#8217;s the general format you would follow:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysql <span style="color: #660033;">-u</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>username<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #660033;">-p</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>password<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>database_to_restore<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>backupfile<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<p>Now how about those zipped files? You can restore your zipped backup files by first uncompressing its contents and then sending it to mysql.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">gunzip</span> <span style="color: #000000; font-weight: bold;">&lt;</span> custback.sql.sql.gz <span style="color: #000000; font-weight: bold;">|</span> mysql <span style="color: #660033;">-u</span> sadmin <span style="color: #660033;">-p</span> pass21 Customers</pre></div></div>

<p>You can also combine two or more backup files to restore at the same time, using the cat command. Here&#8217;s how you can do that.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> backup1.sql backup.sql <span style="color: #000000; font-weight: bold;">|</span> mysql <span style="color: #660033;">-u</span> sadmin <span style="color: #660033;">-p</span> pass21</pre></div></div>

<p><strong>Moving Data Directly Between Databases</strong></p>
<p>How would you like to replicate your present database to a new location? When you are shifting web hosts or database servers, you can directly copy data to the new database without having to create a database backup on your machine and restoring the same on the new server. mysql allows you to connect to a remote database server to run sql commands. Using this feature, we can pipe the output from mysqldump and ask mysql to connect to the remote database server to populate the new database. Let&#8217;s say we want to recreate the Customers database on a new database server located at 202.32.12.32, we can run the following set of commands to replicate the present database at the new server.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysqldump <span style="color: #660033;">-u</span> sadmin <span style="color: #660033;">-p</span> pass21 Customers <span style="color: #000000; font-weight: bold;">|</span> mysql <span style="color: #660033;">--host</span>=202.32.12.32 <span style="color: #660033;">-C</span> Customers</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://lifeuml.com/backing-up-and-restoring-your-mysql-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaMail &#8211; Send a HTML email with attachment using GMail&#8217;s SMTP</title>
		<link>http://lifeuml.com/javamail-send-a-html-email-with-attachment-using-gmails-smtp/</link>
		<comments>http://lifeuml.com/javamail-send-a-html-email-with-attachment-using-gmails-smtp/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 02:57:43 +0000</pubDate>
		<dc:creator>TuyenT</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Attachment]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[GMail]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JavaMail]]></category>
		<category><![CDATA[SMTP]]></category>

		<guid isPermaLink="false">http://lifeuml.com/?p=53</guid>
		<description><![CDATA[After a bundle of trying and testing, here is my final version of send a HTML email with attachment using JavaMail API and GMail&#8217;s SMTP Server.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import java.util.Properties;
import javax.mail.*;
import javax.mail.internet.*;
import javax.activation.*;
&#160;
public class Mail &#123;
	public void sendMail&#40;&#41; throws Exception &#123;
		String SMTP_SERVER = &#34;smtp.gmail.com&#34;;
		String SMTP_PORT = &#34;587&#34;;
&#160;
		final String from = &#34;your-email@gmail.com&#34;;
		final String password = &#34;your-password&#34;;
		String to = &#34;your-friend@somewhere.com&#34;;
		String [...]]]></description>
			<content:encoded><![CDATA[<p>After a bundle of trying and testing, here is my final version of send a HTML email with attachment using JavaMail API and GMail&#8217;s SMTP Server.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.util.Properties</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javax.mail.*</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javax.mail.internet.*</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javax.activation.*</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Mail <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> sendMail<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <span style="color: #003399;">Exception</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #003399;">String</span> SMTP_SERVER <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;smtp.gmail.com&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #003399;">String</span> SMTP_PORT <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;587&quot;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">final</span> <span style="color: #003399;">String</span> from <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;your-email@gmail.com&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">final</span> <span style="color: #003399;">String</span> password <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;your-password&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #003399;">String</span> to <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;your-friend@somewhere.com&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #003399;">String</span> fileAttachment <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;/path/to/attachment/file&quot;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #003399;">String</span> mailSubject <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;JavaMail API with Attachment&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #003399;">String</span> mailContent <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Hello buddy,&quot;</span> <span style="color: #339933;">+</span>
				<span style="color: #0000ff;">&quot;&lt;p&gt;This is an example of sending an HTML email with attachment by JavaMail API.&lt;/p&gt;&quot;</span> <span style="color: #339933;">+</span>
				<span style="color: #0000ff;">&quot;&lt;p&gt;Enjoy the code,&lt;/p&gt;Your name.&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #003399;">String</span> mailFileName <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;attachment-name&quot;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// Get system properties</span>
		<span style="color: #003399;">Properties</span> props <span style="color: #339933;">=</span> <span style="color: #003399;">System</span>.<span style="color: #006633;">getProperties</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// Setup mail server</span>
		props.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;mail.smtp.host&quot;</span>, SMTP_SERVER<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		props.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;mail.smtp.port&quot;</span>, SMTP_PORT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		props.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;mail.smtp.starttls.enable&quot;</span>,<span style="color: #0000ff;">&quot;true&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		props.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;mail.smtp.auth&quot;</span>, <span style="color: #0000ff;">&quot;true&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #003399;">Authenticator</span> pa <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
		pa <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Authenticator</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">PasswordAuthentication</span> getPasswordAuthentication<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">PasswordAuthentication</span><span style="color: #009900;">&#40;</span>from, password<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// Get session</span>
		Session session <span style="color: #339933;">=</span> Session.<span style="color: #006633;">getInstance</span><span style="color: #009900;">&#40;</span>props, pa<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// Define message</span>
		MimeMessage message <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> MimeMessage<span style="color: #009900;">&#40;</span>session<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		message.<span style="color: #006633;">setFrom</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> InternetAddress<span style="color: #009900;">&#40;</span>from<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		message.<span style="color: #006633;">addRecipient</span><span style="color: #009900;">&#40;</span>Message.<span style="color: #006633;">RecipientType</span>.<span style="color: #006633;">TO</span>, <span style="color: #000000; font-weight: bold;">new</span> InternetAddress<span style="color: #009900;">&#40;</span>to<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		message.<span style="color: #006633;">setSubject</span><span style="color: #009900;">&#40;</span>mailSubject<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// create the message part </span>
		MimeBodyPart messageBodyPart <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> MimeBodyPart<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">//fill message</span>
		messageBodyPart.<span style="color: #006633;">setContent</span><span style="color: #009900;">&#40;</span>mailContent, <span style="color: #0000ff;">&quot;text/html&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		Multipart multipart <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> MimeMultipart<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		multipart.<span style="color: #006633;">addBodyPart</span><span style="color: #009900;">&#40;</span>messageBodyPart<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// Part two is attachment</span>
		messageBodyPart <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> MimeBodyPart<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		DataSource source <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> FileDataSource<span style="color: #009900;">&#40;</span>fileAttachment<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		messageBodyPart.<span style="color: #006633;">setDataHandler</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> DataHandler<span style="color: #009900;">&#40;</span>source<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		messageBodyPart.<span style="color: #006633;">setFileName</span><span style="color: #009900;">&#40;</span>mailFileName<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		multipart.<span style="color: #006633;">addBodyPart</span><span style="color: #009900;">&#40;</span>messageBodyPart<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// Put parts in message</span>
		message.<span style="color: #006633;">setContent</span><span style="color: #009900;">&#40;</span>multipart<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// Send the message</span>
		Transport.<span style="color: #006633;">send</span><span style="color: #009900;">&#40;</span>message<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> args<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>  <span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">new</span> Mail<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">sendMail</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Exception</span> e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			e.<span style="color: #006633;">printStackTrace</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Tested and works like a charm <img src='http://lifeuml.com/smilies/yahoo_wink.gif' alt='&#59;&#41;' class='wp-smiley' width='18' height='18' title='&#59;&#41;' /></p>
]]></content:encoded>
			<wfw:commentRss>http://lifeuml.com/javamail-send-a-html-email-with-attachment-using-gmails-smtp/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>Linux Remote Desktop For Controlling Windows (rdesktop)</title>
		<link>http://lifeuml.com/linux-remote-desktop-for-controlling-windows-xp-vista-server-2003-rdesktop/</link>
		<comments>http://lifeuml.com/linux-remote-desktop-for-controlling-windows-xp-vista-server-2003-rdesktop/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 00:25:00 +0000</pubDate>
		<dc:creator>TuyenT</dc:creator>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[rdesktop]]></category>
		<category><![CDATA[Remote Desktop]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://lifeuml.com/?p=48</guid>
		<description><![CDATA[I am responsible for couple of windows servers and windows xp workstations too. When I work from home, I need a way to get into Windows XP/2000/Vista/2003 server for work.

Since I have Debain Linux at home, I needed a way to login into Microsoft windows desktop from Linux OS. Many of us working at tech [...]]]></description>
			<content:encoded><![CDATA[<p>I am responsible for couple of windows servers and windows xp workstations too. When I work from home, I need a way to get into Windows XP/2000/Vista/2003 server for work.</p>
<p><img class="aligncenter size-medium wp-image-49" title="rdesktop" src="http://lifeuml.com/wp-content/uploads/2009/06/rdesktop-300x225.png" alt="rdesktop" width="300" height="225" /></p>
<p>Since I have Debain Linux at home, I needed a way to login into Microsoft windows desktop from Linux OS. Many of us working at tech support use rdesktop to connect to customers&#8217; windows XP box.</p>
<p>Especially it is very useful to configure Outlook or something else when customers do not understand how to configure or troubleshoot problem. This is the best way to fix a problem.</p>
<p>Fortunately, Linux has rdesktop utility. It is a client for remote desktop protocol (RDP), used in a number of Microsoft products including Windows NT Terminal Server, Windows 2000 Server, Windows XP and Windows 2003 Server. You do not need to install VNC server. All you need is rdesktop client on Linux or BSD workstation.</p>
<p><strong>Install rdesktop</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> rdesktop</pre></div></div>

<p>Connect to MS Windows 2000/2003 server from Linux, type the following command at a shell prompt (connect to Windows server called mw2sn100.mycorp.com)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ rdesktop mw2sn100.mycorp.com</pre></div></div>

<p>Or connect to windows XP/Vista workstation having IP 192.168.1.17:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ rdesktop 192.168.1.17</pre></div></div>

<p>Please note that you must first enable remote desktop connection under Windows Server/XP.</p>
<p>* Go to Windows XP Desktop<br />
* Right Click on My Computer<br />
* Select properties<br />
* Select Remote tab<br />
* Enable Remote desktop.<br />
* Save the changes.</p>
<p>Make sure enterprise firewall allows incoming connection on TCP port 3389. rdesktop supports many other options, see man page of rdesktop or visit main website of rdesktop for more information.</p>
<p>Original Post from: <a href="http://www.cyberciti.biz/tips/linux-remote-desktop-for-controlling-windows-xp-desktop.html" target="_blank">cyberciti.biz</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lifeuml.com/linux-remote-desktop-for-controlling-windows-xp-vista-server-2003-rdesktop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
