<?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: Import mysql dump files with view definer and sql security	</title>
	<atom:link href="https://www.binarytides.com/mysql-view-definer-and-sql-security/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.binarytides.com/mysql-view-definer-and-sql-security/</link>
	<description>News, Technology, Entertainment and more</description>
	<lastBuildDate>Fri, 16 May 2014 18:05:00 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
	<item>
		<title>
		By: Jan Novotný		</title>
		<link>https://www.binarytides.com/mysql-view-definer-and-sql-security/comment-page-1/#comment-66168</link>

		<dc:creator><![CDATA[Jan Novotný]]></dc:creator>
		<pubDate>Fri, 16 May 2014 18:05:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=187#comment-66168</guid>

					<description><![CDATA[On Linux machines you can use this one-liner to redefine definer for existing views:

mysql -uuser -ppwd -A --skip-column-names -e&quot;SELECT CONCAT(&#039;SHOW CREATE VIEW &#039;,table_schema,&#039;.&#039;,table_name,&#039;;&#039;) FROM information_schema.tables WHERE engine IS NULL and table_schema like &#039;mydb%&#039;&quot; &#124; mysql -uuser -ppwd -A --skip-column-names &#124; sed -rn &#039;s/.*?VIEW ([^s]+?) (AS .*?)s([^s]+?)s([^s]+?)/DROP VIEW 1;nCREATE VIEW 1 2;/p&#039; &#124; mysql -uuser -ppwd -A --skip-column-names

You have only to replace strings in bold with your DB user credentials and database name / like pattern.

More info here: http://blog.novoj.net/2014/05/16/recreate-mysql-views-without-definer-one-liner-solution-linux/]]></description>
			<content:encoded><![CDATA[<p>On Linux machines you can use this one-liner to redefine definer for existing views:</p>
<p>mysql -uuser -ppwd -A &#8211;skip-column-names -e&#8221;SELECT CONCAT(&#8216;SHOW CREATE VIEW &#8216;,table_schema,&#8217;.&#8217;,table_name,&#8217;;&#8217;) FROM information_schema.tables WHERE engine IS NULL and table_schema like &#8216;mydb%'&#8221; | mysql -uuser -ppwd -A &#8211;skip-column-names | sed -rn &#8216;s/.*?VIEW ([^s]+?) (AS .*?)s([^s]+?)s([^s]+?)/DROP VIEW 1;nCREATE VIEW 1 2;/p&#8217; | mysql -uuser -ppwd -A &#8211;skip-column-names</p>
<p>You have only to replace strings in bold with your DB user credentials and database name / like pattern.</p>
<p>More info here: <a href="http://blog.novoj.net/2014/05/16/recreate-mysql-views-without-definer-one-liner-solution-linux/" rel="nofollow ugc">http://blog.novoj.net/2014/05/16/recreate-mysql-views-without-definer-one-liner-solution-linux/</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: drm		</title>
		<link>https://www.binarytides.com/mysql-view-definer-and-sql-security/comment-page-1/#comment-65166</link>

		<dc:creator><![CDATA[drm]]></dc:creator>
		<pubDate>Thu, 15 Sep 2011 12:57:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=187#comment-65166</guid>

					<description><![CDATA[veggen is right. Views with SQL SECURITY DEFINER is a mechanism to provide data to users that otherwise wouldn&#039;t have the privileges to execute the SELECT query that defines the VIEW.

In other words, the VIEW&#039;s SELECT query (or anything within a FUNCTION or PROCEDURE) is executed with (typically) elevated privileges.]]></description>
			<content:encoded><![CDATA[<p>veggen is right. Views with SQL SECURITY DEFINER is a mechanism to provide data to users that otherwise wouldn&#8217;t have the privileges to execute the SELECT query that defines the VIEW.</p>
<p>In other words, the VIEW&#8217;s SELECT query (or anything within a FUNCTION or PROCEDURE) is executed with (typically) elevated privileges.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: veggen		</title>
		<link>https://www.binarytides.com/mysql-view-definer-and-sql-security/comment-page-1/#comment-65165</link>

		<dc:creator><![CDATA[veggen]]></dc:creator>
		<pubDate>Fri, 22 Oct 2010 15:21:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=187#comment-65165</guid>

					<description><![CDATA[I don&#039;t think you got this right. Using INVOKER security context means that the view/procedure/function will execute with the privileges of the invoker. On the other hand, using DEFINER security context, means the view will execute with definer&#039;s privileges so, in this case, invoker&#039;s privileges are irrelevant.]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t think you got this right. Using INVOKER security context means that the view/procedure/function will execute with the privileges of the invoker. On the other hand, using DEFINER security context, means the view will execute with definer&#8217;s privileges so, in this case, invoker&#8217;s privileges are irrelevant.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
