<?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>Mike Johnson&#039;s Personal Blog</title>
	<atom:link href="http://afterdarkmike.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://afterdarkmike.com</link>
	<description>Yeah - I&#039;m After Dark Mike.</description>
	<lastBuildDate>Tue, 27 Mar 2012 20:28:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>search for a string within all files</title>
		<link>http://afterdarkmike.com/linux-server-administration/search-for-a-string-within-all-files.html</link>
		<comments>http://afterdarkmike.com/linux-server-administration/search-for-a-string-within-all-files.html#comments</comments>
		<pubDate>Tue, 27 Mar 2012 20:28:12 +0000</pubDate>
		<dc:creator>AfterDarkMike</dc:creator>
				<category><![CDATA[Linux Server Administration]]></category>

		<guid isPermaLink="false">http://afterdarkmike.com/?p=261</guid>
		<description><![CDATA[To search all files and sub directories recursively for specific text: and on servers that grep doesn&#8217;t support the -r option: and to exclude files from the search: and to search by extension:]]></description>
			<content:encoded><![CDATA[<p>To search all files and sub directories recursively for specific text:</p>
<pre class="brush: bash; title: ; notranslate">
[root@wdc01 /]# grep -r -i &quot;searchstring&quot; ./
</pre>
<p>and on servers that grep doesn&#8217;t support the -r option:</p>
<pre class="brush: bash; title: ; notranslate">
[root@wdc01 /]# find ./ -exec grep &quot;searchstring&quot; /dev/null '{}' \; -print
</pre>
<p>and to exclude files from the search:</p>
<pre class="brush: bash; title: ; notranslate">
[root@wdc01 /]# find ./ -not -name &quot;*.svn*&quot; -exec grep &quot;searchstring&quot; /dev/null '{}' \; -print
</pre>
<p>and to search by extension:</p>
<pre class="brush: bash; title: ; notranslate">
[root@wdc01 /]# find ./ -not -name &quot;*.svn*&quot; -name &quot;*.php&quot; -exec grep &quot;searchstring&quot; /dev/null '{}' \; -print
</pre>
]]></content:encoded>
			<wfw:commentRss>http://afterdarkmike.com/linux-server-administration/search-for-a-string-within-all-files.html/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My first iOS app with Xcode</title>
		<link>http://afterdarkmike.com/ios-development/my-first-ios-app-with-xcode.html</link>
		<comments>http://afterdarkmike.com/ios-development/my-first-ios-app-with-xcode.html#comments</comments>
		<pubDate>Tue, 06 Mar 2012 17:09:31 +0000</pubDate>
		<dc:creator>AfterDarkMike</dc:creator>
				<category><![CDATA[iOS Development]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[Mobile Development]]></category>
		<category><![CDATA[Mobile Technology]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://afterdarkmike.com/?p=197</guid>
		<description><![CDATA[I&#8217;m not sure what inspired it since I have absolutely no free time with everything else going on in my personal and professional lives, but I decided to learn iOS development. I followed a couple tutorials on Apples Developer site, which was surprisingly easy to get an app up and running in the iPhone emulator. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not sure what inspired it since I have absolutely no free time with everything else going on in my personal and professional lives, but I decided to learn iOS development. I followed a couple tutorials on Apples Developer site, which was surprisingly easy to get an app up and running in the iPhone emulator. </p>
<p>The problem lays in trying to get said app on an actual device. Apparently if your iPhone isn&#8217;t jail broken you can&#8217;t live test your app without a yearly subscription to Apples Developer Program.</p>
<p>Needless to say, after spending 8-9 hours building an app and not being able to test it on my iPhone I&#8217;d had it.</p>
<p>So, instead of a tutorial on your first iPhone app, you get me bitching about Apple wanting $99 a year to test new apps on my personal iPhone and a link to Apples &#8220;<a href="https://developer.apple.com/library/ios/#DOCUMENTATION/iPhone/Conceptual/iPhone101/Articles/01_CreatingProject.html" title="Your First iOS App" target="_blank" rel="nofollow">Your First iOS App</a>&#8221; tutorial.</p>
<p>I will post up a small how-to for an iPhone app once I&#8217;m over being mad about the $99/year.</p>
<p>But hey. <a href="https://developer.apple.com/xcode/" title="Download Xcode" target="_blank" rel="nofollow">Xcode</a> is cool! Go download it and check it out.</p>
]]></content:encoded>
			<wfw:commentRss>http://afterdarkmike.com/ios-development/my-first-ios-app-with-xcode.html/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>How Cloud Computing is Changing the Mobile World</title>
		<link>http://afterdarkmike.com/web-hosting/how-cloud-computing-is-changing-the-mobile-world.html</link>
		<comments>http://afterdarkmike.com/web-hosting/how-cloud-computing-is-changing-the-mobile-world.html#comments</comments>
		<pubDate>Mon, 20 Feb 2012 20:09:03 +0000</pubDate>
		<dc:creator>AfterDarkMike</dc:creator>
				<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Mobile Technology]]></category>

		<guid isPermaLink="false">http://afterdarkmike.com/?p=191</guid>
		<description><![CDATA[It&#39;s no secret that mobile platforms are more popular now than ever before. With the success of smart phones and tablets, people the world over are spending much of their time on the go fiddling with new technology. While mobile computing was once more frustrating than perhaps it was worth, Dell Cloud computing has practically [...]]]></description>
			<content:encoded><![CDATA[<p>It&#39;s no secret that mobile platforms are more popular now than ever before. With the success of smart phones and tablets, people the world over are spending much of their time on the go fiddling with new technology. While mobile computing was once more frustrating than perhaps it was worth, <a href="http://content.dell.com/uk/en/enterprise/cloud-computing.aspx">Dell Cloud computing</a> has practically changed everything. The cloud makes utilizing mobile technology infinitely easier than it once was, and allows even the busiest of individuals to stay on task. The following are three reasons why cloud computing is changing the mobile world, all of which amount to a more streamlined experience.</p>
<h2>Cloud Computing Makes Documents Easily Accessible</h2>
<p>One of the most frustrating issues that comes along with mobile platforms is the fact that storing documents and other data on these devices can be difficult; this is especially true for smart phone users. The cloud has changed everything, however, making it possible to access documents and data quickly and easily. As a result, there&#39;s no need to store anything on the device itself while the data lives in the cloud. Many people find this to be the biggest benefit of cloud computing and how it impacts the mobile world.</p>
<h2>Cloud Computing Allows for Easy Syncing</h2>
<p>Another major benefit that the cloud has brought to mobile technology is the ability to sync documents, calendars and other information. For example, many people like to do their scheduling on a laptop or PC, as typing things out is typically easier on these platforms. Thanks to the cloud, you can create schedules on your PC and sync them up with your phone so that you&#39;ll have them on the go. Syncing is the wave of the future, and further supports the notion of a streamlined interplay between different platforms of technology.</p>
<h2>Cloud Computing is Effortless</h2>
<p>For those who are new to the world of cloud computing, it&#39;s not uncommon to feel a bit intimidated by it all. The fact is, however, cloud computing is extremely effortless, requiring little to no work on the part of the user in order to maintain powerful functionality. Most applications sync with the cloud automatically, and usually offer a walk-through on how to sync certain items for those who prefer to do so manually. As a result, no one should worry about cloud computing being too confusing, as it is designed with simplicity in mind; perfect for mobile platforms.</p>
]]></content:encoded>
			<wfw:commentRss>http://afterdarkmike.com/web-hosting/how-cloud-computing-is-changing-the-mobile-world.html/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Fat Lazy Computer Geek Conversion 1.0</title>
		<link>http://afterdarkmike.com/personal-fitness/fat-lazy-computer-geek-conversion-1-0.html</link>
		<comments>http://afterdarkmike.com/personal-fitness/fat-lazy-computer-geek-conversion-1-0.html#comments</comments>
		<pubDate>Tue, 31 Jan 2012 01:59:48 +0000</pubDate>
		<dc:creator>AfterDarkMike</dc:creator>
				<category><![CDATA[Personal Fitness]]></category>

		<guid isPermaLink="false">http://afterdarkmike.com/?p=178</guid>
		<description><![CDATA[Though not that fat nor lazy or even really a geek, I have been mostly sitting at a computer since late 1995 and could use a bit of an upgrade&#8230; I am just short of 6 feet tall and 195 pounds, which is down 10 from when I decided I was getting a bit old [...]]]></description>
			<content:encoded><![CDATA[<p>Though not that fat nor lazy or even really a geek, I have been mostly sitting at a computer since late 1995 and could use a bit of an upgrade&#8230;</p>
<p>I am just short of 6 feet tall and 195 pounds, which is down 10 from when I decided I was getting a bit old to be eating fast food three meals a day about six months ago.</p>
<p>I haven&#8217;t actually started working out yet but I did buy some equipment, change my diet, and started taking some vitamins and supplements.</p>
<p>I now take AM and PM multi-vitamins, Greens+ twice a day, and fish oils twice a day. Additionally, I have cut out most fast food and poorly prepared and fatty foods.</p>
<p>I have a fresh fruit protein shake for breakfast, and a light lunch and dinner.</p>
<p>Just this little amount has increased my energy levels by at least three times, improved my mood, and decreased the amount of sleep that my body thought it required.</p>
<p>I no longer have problems getting up in the morning, nor getting to sleep at night. I&#8217;m now sleeping 5 to 7 hours a night and feel great and have ample energy to get through the day and to keep up with my new physically demanding girlfriend.</p>
<p>I am not going to post pictures but will update my progress throughout the process. This week I&#8217;m starting cardio! (Not bad since I bought exercise equipment over six months ago intending on working out&#8230;)</p>
]]></content:encoded>
			<wfw:commentRss>http://afterdarkmike.com/personal-fitness/fat-lazy-computer-geek-conversion-1-0.html/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>Finding the top 10 directories using disk space.</title>
		<link>http://afterdarkmike.com/linux-server-administration/finding-the-top-10-directories-using-disk-space.html</link>
		<comments>http://afterdarkmike.com/linux-server-administration/finding-the-top-10-directories-using-disk-space.html#comments</comments>
		<pubDate>Mon, 30 Jan 2012 22:47:27 +0000</pubDate>
		<dc:creator>AfterDarkMike</dc:creator>
				<category><![CDATA[Linux Server Administration]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://afterdarkmike.com/?p=168</guid>
		<description><![CDATA[This command will find the top 10 largest directories, run it from / and then go to the biggest directory and run it again, and on and on and on and on&#8230; until you find what you are looking for]]></description>
			<content:encoded><![CDATA[<p>This command will find the top 10 largest directories, run it from / and then go to the biggest directory and run it again, and on and on and on and on&#8230; until you find what you are looking for</p>
<pre class="brush: bash; title: ; notranslate">
[root@wdc01 /]# du -x --block-size=1024K | sort -nr | head -10
</pre>
]]></content:encoded>
			<wfw:commentRss>http://afterdarkmike.com/linux-server-administration/finding-the-top-10-directories-using-disk-space.html/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>jQuery dialog from external content</title>
		<link>http://afterdarkmike.com/jquery/jquery-dialog-from-external-content.html</link>
		<comments>http://afterdarkmike.com/jquery/jquery-dialog-from-external-content.html#comments</comments>
		<pubDate>Tue, 25 Oct 2011 04:25:11 +0000</pubDate>
		<dc:creator>AfterDarkMike</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery UI]]></category>

		<guid isPermaLink="false">http://afterdarkmike.com/?p=130</guid>
		<description><![CDATA[How to load external content into a jQuery Dialog. First the style Then the JavaScript Then the HTML Should be straight forward. Just point the link to the file you want to pull into the Dialog box. Don&#8217;t forget that the Dialog is a part of jQuery UI, not just the standard jQuery &#8211; you [...]]]></description>
			<content:encoded><![CDATA[<p>How to load external content into a jQuery Dialog.</p>
<p>First the style</p>
<pre class="brush: css; title: ; notranslate">
&lt;style type=&quot;text/css&quot;&gt;
    #terms-and-conditions-content{display:none}
&lt;/style&gt;
</pre>
<p>Then the JavaScript</p>
<pre class="brush: jscript; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot;&gt;
    // &lt;![CDATA[
        $(document).ready(function(){ $('#terms-and-conditions').click(function(e){ e.preventDefault();
        var url = $(this).attr('href');
        $('#terms-and-conditions-content').load(url);
        $(&quot;#terms-and-conditions-content&quot;).dialog({ width:800,modal: true,buttons: { &quot;Close&quot;: function() { $(this).dialog(&quot;close&quot;); } } }); }); });
    // ]]&gt;
&lt;/script&gt;
</pre>
<p>Then the HTML</p>
<pre class="brush: xml; title: ; notranslate">
    &lt;a id=&quot;terms-and-conditions&quot; href=&quot;/terms.html&quot;&gt;Click Here&lt;/a&gt;
</pre>
<p>Should be straight forward. Just point the link to the file you want to pull into the Dialog box.</p>
<p>Don&#8217;t forget that the Dialog is a part of jQuery UI, not just the standard jQuery &#8211; you will need to include both.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot; src=&quot;http&lt;?=$_SERVER['HTTPS']=='on'?'s':''?&gt;://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
    // &lt;![CDATA[
        !window.jQuery &amp;&amp; document.write('&lt;script src=&quot;/js/jquery-1.6.2.min.js&quot;&gt;&lt;\/script&gt;')
    // ]]&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;/js/jquery-ui-1.8.16.custom.min.js&quot;&gt;&lt;/script&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://afterdarkmike.com/jquery/jquery-dialog-from-external-content.html/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>How to use find and mv How to use find and mv/</title>
		<link>http://afterdarkmike.com/linux-server-administration/how-to-use-find-and-mv-how-to-use-find-and-mv.html</link>
		<comments>http://afterdarkmike.com/linux-server-administration/how-to-use-find-and-mv-how-to-use-find-and-mv.html#comments</comments>
		<pubDate>Sun, 16 Oct 2011 16:18:10 +0000</pubDate>
		<dc:creator>AfterDarkMike</dc:creator>
				<category><![CDATA[Linux Server Administration]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://afterdarkmike.com/?p=126</guid>
		<description><![CDATA[After using &#8220;wget -spyder&#8221; to download a directory index and all linked files, I noticed they ended up in 70 or 80 different directories on my local machine. I found that using &#8220;find&#8221; and &#8220;mv&#8221; worked the best to round them up and put them in the root of the directory structure.]]></description>
			<content:encoded><![CDATA[<p>After using &#8220;wget -spyder&#8221; to download a directory index and all linked files, I noticed they ended up in 70 or 80 different directories on my local machine.</p>
<p>I found that using &#8220;find&#8221; and &#8220;mv&#8221; worked the best to round them up and put them in the root of the directory structure.</p>
<pre class="brush: bash; title: ; notranslate">mikej@wdc01 ~/# find * -type f -exec mv {} . \;</pre>
]]></content:encoded>
			<wfw:commentRss>http://afterdarkmike.com/linux-server-administration/how-to-use-find-and-mv-how-to-use-find-and-mv.html/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>SSL certificate installation on Ubuntu/Nginx</title>
		<link>http://afterdarkmike.com/linux-server-administration/ssl-certificate-installation-on-ubuntu-nginx.html</link>
		<comments>http://afterdarkmike.com/linux-server-administration/ssl-certificate-installation-on-ubuntu-nginx.html#comments</comments>
		<pubDate>Sat, 08 Oct 2011 23:15:26 +0000</pubDate>
		<dc:creator>AfterDarkMike</dc:creator>
				<category><![CDATA[Linux Server Administration]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://afterdarkmike.com/?p=117</guid>
		<description><![CDATA[How to generate an SSL Certificate Signing Request for your Nginx Web Server with OpenSSL and install your SSL Certificate on your Nginx web server. Actually I was surprised how easy it was to install SSL certificates for Nginx on Ubuntu. I don&#8217;t remember if it was needed or not at this point or just [...]]]></description>
			<content:encoded><![CDATA[<p>How to generate an SSL Certificate Signing Request for your Nginx Web Server with OpenSSL and install your SSL Certificate on your Nginx web server.</p>
<p>Actually I was surprised how easy it was to install SSL certificates for Nginx on Ubuntu.</p>
<p>I don&#8217;t remember if it was needed or not at this point or just when I was installing self signed SSL certificates for testing but, make sure you have the ssl-cert package installed:</p>
<pre class="brush: plain; title: ; notranslate">admin@www1:~/sudo aptitude install ssl-cert openssl</pre>
<p>Then make the CSR:</p>
<pre class="brush: plain; title: ; notranslate">admin@www1:~/sudo openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr</pre>
<p>This will start the process to generate two files: the Private-Key file for the decryption of your SSL Certificate, and a certificate signing request (CSR) file used to when ordering your SSL Certificate.</p>
<p>When you are prompted for the Common Name, which is your domain name, enter the fully qualified domain name for the site you are securing. Either www.afterdarkmike.com or afterdarkmike.com. Remember accessing the opposite of which you select via web browser will generate a miss-match domain security warning, with most browsers stopping you there.</p>
<p>If you are generating a Wildcard SSL Certificate for your Nginx server, make sure your common name starts with an asterisk (e.g. *.afterdarkmike.com).</p>
<p>Open the .csr file with a text editor (nano,vi,etc) and copy and paste it (including the BEGIN and END tags) into your SSL order form. Save the certificate files, you will need them later.</p>
<p>In my case I was purchasing a <a href="http://afterdarkcommunications.com/domain-services/ssl-certificates/geotrust/rapidssl.html" title="GeoTrust RapidSSL Certificate ">GeoTrust RapidSSL Certificate</a> for a clients website we host and manage at After Dark Communications.</p>
<p>At the time of posting, your RapidSSL order will be shipped via an email which will include the SSL Certificate as well as the intermediate CA bundle. Copy them both into one file, including the &#8212;&#8211;BEGIN CERTIFICATE&#8212;&#8211; and &#8212;&#8211;END CERTIFICATE&#8212;&#8211; header/footers and save it as commonname.crt. ex afterdarkmike.com.crt.</p>
<p>So your file will look like:</p>
<pre class="brush: plain; title: ; notranslate">-----BEGIN CERTIFICATE-----
Web Server CERTIFICATE blahblah blah blah blahblah blah
...
blahblah blah blah blahblah blah
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
INTERMEDIATE CA CERTIFICATE blahblah blah blah blahblah blah
...
blahblah blah blah blahblah blah
-----END CERTIFICATE-----</pre>
<p>Upload it to the server.</p>
<p>Now to set up Nginx.</p>
<p>Edit the Nginx Virtual Hosts File:</p>
<pre class="brush: plain; title: ; notranslate">server {
	listen 443;
	ssl on;
	&lt;strong&gt;ssl_certificate /etc/ssl/ssl.crt;&lt;/strong&gt;
	&lt;strong&gt;ssl_certificate_key /etc/ssl/domain.key;&lt;/strong&gt;
	server_name your.domain.com;
	access_log /var/log/nginx/nginx.vhost.access.log;
	error_log /var/log/nginx/nginx.vhost.error.log;
	location / {
		root /home/www/public_html/your.domain.com/public/;
		index index.html;
	}
}</pre>
<p>Adjust the file names to match the certificate files and restart Nginx.</p>
]]></content:encoded>
			<wfw:commentRss>http://afterdarkmike.com/linux-server-administration/ssl-certificate-installation-on-ubuntu-nginx.html/feed/</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
		<item>
		<title>EXIM4 &#8211; Remote Domains Not Supported</title>
		<link>http://afterdarkmike.com/linux-administration/exim4-remote-domains-not-supported.html</link>
		<comments>http://afterdarkmike.com/linux-administration/exim4-remote-domains-not-supported.html#comments</comments>
		<pubDate>Thu, 06 Oct 2011 21:49:38 +0000</pubDate>
		<dc:creator>AfterDarkMike</dc:creator>
				<category><![CDATA[Linux Administration]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://afterdarkmike.com/?p=110</guid>
		<description><![CDATA[After Moving some sites to a fresh Ubuntu VPS for some testing I noticed that the contact forms were not working. In my default Ubuntu VPS image, the &#8220;local mail only&#8221; feature is set. Executing the following command and selecting the &#8220;internet site; mail is sent and received directly using SMTP&#8221; option will solve your [...]]]></description>
			<content:encoded><![CDATA[<p>After Moving some sites to a fresh Ubuntu VPS for some testing I noticed that the contact forms were not working.</p>
<pre class="brush: plain; title: ; notranslate">2011-10-03 03:31:43 1RAZFn-0006hC-I2 &lt;= www-data@corp.host.com U=www-data P=local S=648
2011-10-03 03:31:43 1RAZFn-0006hC-I2 ** sales@host.com R=nonlocal: Mailing to remote domains not supported
2011-10-03 03:31:43 1RAZFn-0006hE-Ig &lt;= &lt;&gt; R=1RAZFn-0006hC-I2 U=Debian-exim P=local S=1619
2011-10-03 03:31:43 1RAZFn-0006hC-I2 Completed</pre>
<p>In my default Ubuntu VPS image, the &#8220;local mail only&#8221; feature is set.</p>
<p>Executing the following command and selecting the &#8220;internet site; mail is sent and received directly using SMTP&#8221; option will solve your issue. You should be able to select the default option for the rest of the questions.</p>
<pre class="brush: plain; title: ; notranslate">admin@db:~$ dpkg-reconfigure exim4-config</pre>
]]></content:encoded>
			<wfw:commentRss>http://afterdarkmike.com/linux-administration/exim4-remote-domains-not-supported.html/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>MySQL: “Access denied for user ‘debian-sys-maint’@&#8217;localhost’”</title>
		<link>http://afterdarkmike.com/linux-administration/mysql-access-denied-for-user-debian-sys-maint-localhost.html</link>
		<comments>http://afterdarkmike.com/linux-administration/mysql-access-denied-for-user-debian-sys-maint-localhost.html#comments</comments>
		<pubDate>Mon, 03 Oct 2011 04:05:42 +0000</pubDate>
		<dc:creator>AfterDarkMike</dc:creator>
				<category><![CDATA[Linux Administration]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://afterdarkmike.com/?p=102</guid>
		<description><![CDATA[I recently migrated one of our MySQL servers (Simply by using rsync) and afterwards when restarting the MySQL server I was faced with: This MySQL user is created for Ubuntu to be able to start/stop the database and to preform other maintenance operations. The issue is that with each update to MySQL, the user’s password [...]]]></description>
			<content:encoded><![CDATA[<p>I recently migrated one of our MySQL servers (Simply by using rsync) and afterwards when restarting the MySQL server I was faced with:</p>
<pre class="brush: plain; title: ; notranslate">admin@db:~$ sudo /etc/init.d/mysql restart
* Stopping MySQL database server mysqld &lt;strong&gt;[fail]&lt;/strong&gt;
* Starting MySQL database server mysqld [ OK ]
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: '&lt;strong&gt;Access denied for user 'debian-sys-maint'@'localhost'&lt;/strong&gt; (using password: YES)'</pre>
<p>This MySQL user is created for Ubuntu to be able to start/stop the database and to preform other maintenance operations.</p>
<p>The issue is that with each update to MySQL, the user’s password in the database is overwritten.  Ubuntu searches the file <i>/etc/mysql/debian.cnf</i> in order to find this user’s password, but obviously the password was out of sync after copying the databases from the old database server.</p>
<p>First, check the contents of the <i>/etc/mysql/debian.cnf</i> file:</p>
<pre class="brush: plain; title: ; notranslate">admin@db:~$sudo cat /etc/mysql/debian.cnf</pre>
<p>The contents of the file should look something like the:</p>
<pre class="brush: plain; title: ; notranslate"># Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host     = localhost
user     = debian-sys-maint
&lt;strong&gt;password = PASSWORD&lt;/strong&gt;
socket   = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
user     = debian-sys-maint
&lt;strong&gt;password = PASSWORD&lt;/strong&gt;
socket   = /var/run/mysqld/mysqld.sock
basedir  = /usr</pre>
<p>The PASSWORD   is what we’re looking for.</p>
<p>Next, you will want to issue a command to MySQL to tell it to grant the <i>debian-sys-maint</i> user all necessary privileges using the new password.</p>
<p>Login to your MySQL server using your root account and the root password:</p>
<pre class="brush: plain; title: ; notranslate">admin@db:~$ mysql -u root -p</pre>
<p>Issue the GRANT command now to grant those permissions:</p>
<pre class="brush: plain; title: ; notranslate">mysql&gt; GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'PASSWORD';</pre>
<p>Restart MySQL, you should no longer be getting the “access denied” error message.</p>
<pre class="brush: plain; title: ; notranslate">admin@db:~$ sudo /etc/init.d/mysql restart
* Stopping MySQL database server mysqld [ OK ]
* Starting MySQL database server mysqld [ OK ]
* Checking for corrupt, not cleanly closed and upgrade needing tables.</pre>
<p>You may need to kill the MySQL server processes in order to get MySQL to shut down.</p>
]]></content:encoded>
			<wfw:commentRss>http://afterdarkmike.com/linux-administration/mysql-access-denied-for-user-debian-sys-maint-localhost.html/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>

