<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
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/"
> <channel><title>Comments on: Dropping a table does not remove permissions granted to it in MySQL</title> <atom:link href="http://www.haidongji.com/2009/02/23/dropping-a-table-does-not-remove-permissions-granted-to-it-in-mysql/feed/" rel="self" type="application/rss+xml" /><link>http://www.haidongji.com/2009/02/23/dropping-a-table-does-not-remove-permissions-granted-to-it-in-mysql/</link> <description>季庄新闻--Haidong Ji's Blog</description> <lastBuildDate>Wed, 04 Jan 2012 09:32:09 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.1.2</generator> <item><title>By: Haidong Ji</title><link>http://www.haidongji.com/2009/02/23/dropping-a-table-does-not-remove-permissions-granted-to-it-in-mysql/comment-page-1/#comment-17673</link> <dc:creator>Haidong Ji</dc:creator> <pubDate>Thu, 26 Feb 2009 05:07:37 +0000</pubDate> <guid
isPermaLink="false">http://www.haidongji.com/?p=567#comment-17673</guid> <description>Hi Don and Tim,
Thanks for the great comments.
@Don, thanks for the link. Interestingly, I think I encountered a bug of MySQL 5.1 Community on Windows, where if you do:
create user &#039;haidong&#039;@&#039;%&#039; identified by &#039;StrongPassword&#039;;
grant select on test.t1 to &#039;haidong&#039;@&#039;%&#039;;
flush privileges
and haidong could not connect! I think I will need to dig further.
@Tim S.
The DROP DATABASE PURGE USERS is an intriguing idea. I still think that when something is dropped, everything that associated with that object should go, or dereferenced, for lack of better word. I know that it is a common practice to for pre-built script to drop and recreate tables, but I will submit part of that script should take care of permissions.
Been busy lately. I may come back to this when I get a moment to spare. Thanks again for the comments.</description> <content:encoded><![CDATA[<p>Hi Don and Tim,</p><p>Thanks for the great comments.</p><p>@Don, thanks for the link. Interestingly, I think I encountered a bug of MySQL 5.1 Community on Windows, where if you do:</p><p>create user &#8216;haidong&#8217;@'%&#8217; identified by &#8216;StrongPassword&#8217;;<br
/> grant select on test.t1 to &#8216;haidong&#8217;@'%&#8217;;<br
/> flush privileges</p><p>and haidong could not connect! I think I will need to dig further.</p><p>@Tim S.</p><p>The DROP DATABASE PURGE USERS is an intriguing idea. I still think that when something is dropped, everything that associated with that object should go, or dereferenced, for lack of better word. I know that it is a common practice to for pre-built script to drop and recreate tables, but I will submit part of that script should take care of permissions.</p><p>Been busy lately. I may come back to this when I get a moment to spare. Thanks again for the comments.</p> ]]></content:encoded> </item> <item><title>By: Don McArthur</title><link>http://www.haidongji.com/2009/02/23/dropping-a-table-does-not-remove-permissions-granted-to-it-in-mysql/comment-page-1/#comment-17672</link> <dc:creator>Don McArthur</dc:creator> <pubDate>Wed, 25 Feb 2009 21:40:34 +0000</pubDate> <guid
isPermaLink="false">http://www.haidongji.com/?p=567#comment-17672</guid> <description>Tim S.,
I like that, it&#039;s clever. Though I&#039;m not much of a fan of deviating from the SQL standard (more than all RDBMSs do already).
How about an extension to the user account management syntax? PURGE ACCOUNTS WITHOUT VALID GRANTS or some such?</description> <content:encoded><![CDATA[<p>Tim S.,</p><p>I like that, it&#8217;s clever. Though I&#8217;m not much of a fan of deviating from the SQL standard (more than all RDBMSs do already).</p><p>How about an extension to the user account management syntax? PURGE ACCOUNTS WITHOUT VALID GRANTS or some such?</p> ]]></content:encoded> </item> <item><title>By: Tim S.</title><link>http://www.haidongji.com/2009/02/23/dropping-a-table-does-not-remove-permissions-granted-to-it-in-mysql/comment-page-1/#comment-17671</link> <dc:creator>Tim S.</dc:creator> <pubDate>Wed, 25 Feb 2009 20:26:38 +0000</pubDate> <guid
isPermaLink="false">http://www.haidongji.com/?p=567#comment-17671</guid> <description>So I was thinking about this a bit and the thought occurred to me - you might be able to get this to work by simply modifying the DROP DATABASE syntax. So, say, DROP DATABASE by itself would not remove the users associated with that database. But, perhaps something like &quot;DROP DATABASE  PURGE USERS&quot; or something might work.
That would actually be pretty nice since it doesn&#039;t mess with existing behavior but still allows some nice functionality.
Just some thoughts!
Tim S.</description> <content:encoded><![CDATA[<p>So I was thinking about this a bit and the thought occurred to me &#8211; you might be able to get this to work by simply modifying the DROP DATABASE syntax. So, say, DROP DATABASE by itself would not remove the users associated with that database. But, perhaps something like &#8220;DROP DATABASE  PURGE USERS&#8221; or something might work.</p><p>That would actually be pretty nice since it doesn&#8217;t mess with existing behavior but still allows some nice functionality.</p><p>Just some thoughts!</p><p>Tim S.</p> ]]></content:encoded> </item> <item><title>By: Tim S.</title><link>http://www.haidongji.com/2009/02/23/dropping-a-table-does-not-remove-permissions-granted-to-it-in-mysql/comment-page-1/#comment-17670</link> <dc:creator>Tim S.</dc:creator> <pubDate>Tue, 24 Feb 2009 14:07:52 +0000</pubDate> <guid
isPermaLink="false">http://www.haidongji.com/?p=567#comment-17670</guid> <description>There are quite a few edge cases I don&#039;t think you&#039;ve realized as well. What if I dropped the table (on accident or purpose) and needed to re-create it? Or what if I am importing data from a dump-file (which usually includes DROP TABLE statements, and for good reason)?</description> <content:encoded><![CDATA[<p>There are quite a few edge cases I don&#8217;t think you&#8217;ve realized as well. What if I dropped the table (on accident or purpose) and needed to re-create it? Or what if I am importing data from a dump-file (which usually includes DROP TABLE statements, and for good reason)?</p> ]]></content:encoded> </item> <item><title>By: Don McArthur</title><link>http://www.haidongji.com/2009/02/23/dropping-a-table-does-not-remove-permissions-granted-to-it-in-mysql/comment-page-1/#comment-17669</link> <dc:creator>Don McArthur</dc:creator> <pubDate>Tue, 24 Feb 2009 13:39:28 +0000</pubDate> <guid
isPermaLink="false">http://www.haidongji.com/?p=567#comment-17669</guid> <description>The issue fades to insignificance when compared to this:
&quot;When a client attempts to connect, the server looks through the sorted rows and uses the first match found. For a connection from localhost by jeffrey, two of the rows from the table match: the one with Host and User values of &#039;localhost&#039; and &#039;&#039;, and the one with values of &#039;%&#039; and &#039;jeffrey&#039;. The &#039;localhost&#039;  row appears first in sorted order, so that is the one the server uses.&quot;
http://dev.mysql.com/doc/refman/5.1/en/connection-access.html</description> <content:encoded><![CDATA[<p>The issue fades to insignificance when compared to this:</p><p>&#8220;When a client attempts to connect, the server looks through the sorted rows and uses the first match found. For a connection from localhost by jeffrey, two of the rows from the table match: the one with Host and User values of &#8216;localhost&#8217; and &#8221;, and the one with values of &#8216;%&#8217; and &#8216;jeffrey&#8217;. The &#8216;localhost&#8217;  row appears first in sorted order, so that is the one the server uses.&#8221;</p><p><a
href="http://dev.mysql.com/doc/refman/5.1/en/connection-access.html" rel="nofollow">http://dev.mysql.com/doc/refman/5.1/en/connection-access.html</a></p> ]]></content:encoded> </item> </channel> </rss>
