<?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>MySQL Preacher &#187; grants</title>
	<atom:link href="http://mysqlpreacher.com/wordpress/tag/grants/feed/" rel="self" type="application/rss+xml" />
	<link>http://mysqlpreacher.com/wordpress</link>
	<description>Because Sharing is Caring</description>
	<lastBuildDate>Sat, 14 Apr 2012 17:45:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>Recovering a MySQL `root` password &#8211; Three solutions</title>
		<link>http://mysqlpreacher.com/wordpress/2011/03/recovering-a-mysql-root-password-three-solutions/</link>
		<comments>http://mysqlpreacher.com/wordpress/2011/03/recovering-a-mysql-root-password-three-solutions/#comments</comments>
		<pubDate>Mon, 21 Mar 2011 19:00:58 +0000</pubDate>
		<dc:creator>Darren Cassar</dc:creator>
				<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac OS]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[grants]]></category>
		<category><![CDATA[pass]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[skip-grant-tables]]></category>
		<category><![CDATA[user]]></category>
		<category><![CDATA[user.myd]]></category>

		<guid isPermaLink="false">http://mysqlpreacher.com/wordpress/?p=657</guid>
		<description><![CDATA[Three ways to recover a root user password: The order of solutions here under gets more creative on the way down :) 1. obviously, before starting messing around check my.cnf or scripts for passwords entries, then try home directories for password files 2. secondly &#8211; can you restart mysql? if yes, restart with &#8211;skip-grant-tables, log [...]]]></description>
			<content:encoded><![CDATA[<p>Three ways to recover a root user password:</p>
<p>The order of solutions here under gets more creative on the way down :)</p>
<p>1. obviously, before starting messing around check my.cnf or scripts for passwords entries, then try home directories for password files<br />
2. secondly &#8211; can you restart mysql? if yes, restart with &#8211;skip-grant-tables, log into mysql, change your password and restart without &#8211;skip-grant-tables<br />
3. third option &#8211; (on linux / unix ONLY)<br />
If you haven’t found the password anywhere and can&#8217;t afford to restart your mysql.</p>
<pre class="brush:shell">cd data/mysql
cp -rp user.MYD bck_user.MYD_`date +%Y%m%d`
cp -rp user.MYD /tmp/user.MYD
vi /tmp/user.MYD #(edit the hashed passwords next to root*)
cp -rp /tmp/user.MYD user.MYD
sudo kill -HUP `pidof mysqld`</pre>
<p>Note that the latter method of recovering a root password CAN be easily used maliciously leaving no trace! The only way to avoid such an attack is to make the data directory ONLY readable and writable by the user used to start/stop mysql (don&#8217;t user *nix root user to own mysql since that opens another can of worms &#8230; it&#8217;s a whole other blog post).</p>
]]></content:encoded>
			<wfw:commentRss>http://mysqlpreacher.com/wordpress/2011/03/recovering-a-mysql-root-password-three-solutions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Securich 0.3.0</title>
		<link>http://mysqlpreacher.com/wordpress/2010/08/securich-0-3-0/</link>
		<comments>http://mysqlpreacher.com/wordpress/2010/08/securich-0-3-0/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 21:59:19 +0000</pubDate>
		<dc:creator>Darren Cassar</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[froscon]]></category>
		<category><![CDATA[grants]]></category>
		<category><![CDATA[roles]]></category>
		<category><![CDATA[securich]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://mysqlpreacher.com/wordpress/?p=391</guid>
		<description><![CDATA[Around these days last year I presented `securich` for the first time. It was at froscon 2009, barely knowing anybody, spending my 27th birthday in a hostel in Germany fixing some bugs before the actual presentation on a 10 inch netbook (my mac had some problems at the time but thats another story :)). I [...]]]></description>
			<content:encoded><![CDATA[<p>Around these days last year I presented `securich` for the first time. It was at <a href="http://programm.froscon.org/2009/events/454.en.html" target="blank">froscon 2009</a>, barely knowing anybody, spending my 27th birthday in a hostel in Germany fixing some bugs before the actual presentation on a 10 inch netbook (my mac had some problems at the time but thats another story :)). I got a beating, verbally of course! Many of the people listening to the presentation were expecting something else since another presentation was supposed to be running at that time, some even started dozing off (encouraging? not really hehe) but after a few minutes people started getting interested and asking all kind of questions. &#8220;This awesome&#8221; I thought to myself, &#8220;questions are good, it means people are understanding and want to know more&#8221;, but the more they learnt the more they realised how young securich was as a tool, lacking fundamental features like reverse reconciling securich with mysql rather than the other way round, bugs cropping up (<a href="http://datacharmer.blogspot.com/" target="blank">Giuseppe aka datacharmer</a> made sure he found some on the fly :P) but oh well back then it was just four months old.</p>
<p>Now after a year and four months into it, Securich is still in Beta but MANY MANY more features were included, bugs fixed (others created) and it even made it through two sessions at the Oreilly MySQL Conference and Expo 2010 and two mysql university sessions.</p>
<p>The end points here are:<br />
1. Share your knowledge and code with the community, we learn, you learn!<br />
2. When you fall to the ground, climb back up and get on your feet again. Start running!<br />
3. Securich is now at version 0.3.0 (10th official release), help yourself at <a href="http://code.google.com/p/securich/" target="blank">google code</a> your feedback is greatly appreciated!</p>
<p>Most of the new release is bug fixes but some of the features added in this version are:<br />
1. Any user can now install securich not just mysql root<br />
2. You can now grant privileges on the mysql db (by default still disabled as it runs in &#8220;strict&#8221; mode which needs to be changed to &#8220;lenient&#8221; manually)<br />
3. The installation script now keeps the securich package intact for further many installations<br />
4. Better error reporting (for debugging purposes)<br />
5. Grants on tables using regexp are now case sensitive</p>
]]></content:encoded>
			<wfw:commentRss>http://mysqlpreacher.com/wordpress/2010/08/securich-0-3-0/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>MySQL &#8211; IP vs DNS</title>
		<link>http://mysqlpreacher.com/wordpress/2009/12/mysql-ip-vs-dns/</link>
		<comments>http://mysqlpreacher.com/wordpress/2009/12/mysql-ip-vs-dns/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 15:39:12 +0000</pubDate>
		<dc:creator>Darren Cassar</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[grants]]></category>
		<category><![CDATA[hosts]]></category>
		<category><![CDATA[skip-name-resolve]]></category>

		<guid isPermaLink="false">http://mysqlpreacher.com/wordpress/?p=315</guid>
		<description><![CDATA[A MySQL is running happily on a machine situated in a land far far away. I grant access to a user@machine_aaaaaa (grant select on db.* to &#8216;user&#8217;@'machine_aaaaa&#8217; identified by &#8216;password&#8217;; flush privileges;), send an email to the user saying it should run fine and happily go off my way. Mistake! It seems this user can&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>A MySQL is running happily on a machine situated in a land far far away. I grant access to a user@machine_aaaaaa (grant select on db.* to &#8216;user&#8217;@'machine_aaaaa&#8217; identified by &#8216;password&#8217;; flush privileges;), send an email to the user saying it should run fine and happily go off my way. Mistake!</p>
<p>It seems this user can&#8217;t connect to the mysql gets access denied:<br />
Access denied for user &#8216;user&#8217;@'machine_bbbbb&#8217; (using password: YES)</p>
<p>Note that the machine the user is being seen from is totally different from the one I set up in the grant!! WHY?</p>
<p>run a reverse lookup on the ip of machine_aaaaa, turns out it shows machine_bbbbb. So I figure a big bad guy messed up /etc/hosts, I was right! `cat /etc/hosts` just to find an entry for machine_aaaaa blehh</p>
<p>Ok, solution is to remove the entry from /etc/hosts (after finding out it wasn&#8217;t even necessary and wasn&#8217;t even supposed to be there in the first place), restart nscd.</p>
<p>Retry<br />
AGAIN &#8211; Access denied for user &#8216;user&#8217;@'machine_bbbbb&#8217; (using password: YES)</p>
<p>What the &#8230;.</p>
<p>What&#8217;s wrong now? &#8212; yeah silly me forgot to `flush hosts` :) </p>
<p>Retry<br />
YOHOO I&#8217;m in!</p>
<p>I&#8217;ve seen quite a few blogs about disabling name resolve in mysql with skip-name-resolve and granting privileges using IPs &#8211; something which would also have avoided the above (but still not found the root of the problem):</p>
<p><a href="http://jeremy.zawodny.com/blog/archives/011421.html">http://jeremy.zawodny.com/blog/archives/011421.html</a><br />
<a href="http://www.mysqlperformanceblog.com/2008/05/31/dns-achilles-heel-mysql-installation/">http://www.mysqlperformanceblog.com/2008/05/31/dns-achilles-heel-mysql-installation/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mysqlpreacher.com/wordpress/2009/12/mysql-ip-vs-dns/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

