<?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>dbForge Team Blog &#187; MySQL</title>
	<atom:link href="http://www.devart.com/blogs/dbforge/index.php/category/mysql/feed" rel="self" type="application/rss+xml" />
	<link>http://www.devart.com/blogs/dbforge</link>
	<description>Technical notes, articles and tips on database development.</description>
	<lastBuildDate>Fri, 03 Feb 2012 13:55:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Mind data modifications via Data Editor in dbForge Studio for MySQL</title>
		<link>http://www.devart.com/blogs/dbforge/index.php/mind-data-modifications-via-data-editor-in-dbforge-studio-for-mysql.html</link>
		<comments>http://www.devart.com/blogs/dbforge/index.php/mind-data-modifications-via-data-editor-in-dbforge-studio-for-mysql.html#comments</comments>
		<pubDate>Mon, 30 Jan 2012 14:35:24 +0000</pubDate>
		<dc:creator>.jp</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Data Editor]]></category>

		<guid isPermaLink="false">http://www.devart.com/blogs/dbforge/?p=2360</guid>
		<description><![CDATA[Since one of our users has encountered a problem when modifying data via Data Editor, we decided to bring such a situation to our users&#8217; attention. Let&#8217;s assume you have the following table: CREATE TABLE dept&#40; DeptNo INT&#40;10&#41;, DName VARCHAR&#40;14&#41;, loc VARCHAR&#40;13&#41;, Salsum FLOAT &#41;; Let&#8217;s execute the following query in the SQL document: SELECT [...]]]></description>
			<content:encoded><![CDATA[<p>Since one of our users has encountered a problem when modifying data via <a title="dbForge Studio for MySQL Data Editor" href="http://www.devart.com/dbforge/mysql/studio/">Data Editor</a>, we decided to bring such a situation to our users&#8217; attention.</p>
<p>Let&#8217;s assume you have the following table:</p>

<div class="wp_syntax"><div class="code"><pre class="plsql" style="font-family:monospace;"><span style="color: #00F;">CREATE</span> <span style="color: #00F;">TABLE</span> dept<span style="color: #00F;">&#40;</span>
  DeptNo INT<span style="color: #00F;">&#40;</span><span style="color: #800;">10</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  DName <span style="color: #00F;">VARCHAR</span><span style="color: #00F;">&#40;</span><span style="color: #800;">14</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  loc <span style="color: #00F;">VARCHAR</span><span style="color: #00F;">&#40;</span><span style="color: #800;">13</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  Salsum <span style="color: #00F;">FLOAT</span>
<span style="color: #00F;">&#41;</span><span style="color: #00F;">;</span></pre></div></div>

<p style="text-align: center;"><a href="http://www.devart.com/blogs/dbforge/wp-content/uploads/2012/01/Data-Editor-1.jpg"><img class="size-full wp-image-2362  aligncenter" title="Data-Editor-1" src="http://www.devart.com/blogs/dbforge/wp-content/uploads/2012/01/Data-Editor-1.jpg" alt="Data-Editor-1" width="240" height="151" /></a></p>
<p>Let&#8217;s execute the following query in the SQL document:</p>

<div class="wp_syntax"><div class="code"><pre class="plsql" style="font-family:monospace;"><span style="color: #00F;">SELECT</span> DName<span style="color: #00F;">,</span> loc <span style="color: #00F;">FROM</span> dept <span style="color: #00F;">WHERE</span> DeptNo <span style="color: #00F;">=</span> <span style="color: #800;">20</span><span style="color: #00F;">;</span></pre></div></div>

<p>Now if you change any of the values of the first record in Data Editor, the changes will be applied to all records of the original table that have &#8216;DName&#8217; = &#8216;Research&#8217; and &#8216;loc&#8217; = &#8216;Dallas&#8217;.</p>
<p><a href="http://www.devart.com/blogs/dbforge/wp-content/uploads/2012/01/Data-Editor-2.jpg"><img class="aligncenter size-full wp-image-2366" title="Data-Editor-2" src="http://www.devart.com/blogs/dbforge/wp-content/uploads/2012/01/Data-Editor-2.jpg" alt="Data-Editor-2" width="624" height="155" /></a></p>
<p>It happens because when dbForge Studio for MySQL generates the internal UPDATE statement, only the fields returned by the previous query are included in the WHERE clause of the UPDATE statement. In our example DeptNo = 20 that was stated in the WHERE clause of the SELECT statement was not included  in the internal UPDATE statement as there was no the &#8216;DeptNo&#8217; field in the grid when modifying data.</p>
<p>So that if you&#8217;re planning to modify data that will be returned as a result of the SELECT statement in the grid, we suggest you to make sure that all the fields that are specified in the WHERE clause of the SELECT statement are also specified in the SELECT clause of the statement.</p>
<p>In our example, you have to specify the &#8216;DeptNo&#8217; field in the SELECT clause of the statement.</p>

<div class="wp_syntax"><div class="code"><pre class="plsql" style="font-family:monospace;"><span style="color: #00F;">SELECT</span> DeptNo<span style="color: #00F;">,</span> DName<span style="color: #00F;">,</span> loc <span style="color: #00F;">FROM</span> dept <span style="color: #00F;">WHERE</span> DeptNo <span style="color: #00F;">=</span> <span style="color: #800;">20</span><span style="color: #00F;">;</span></pre></div></div>

<p>Now if you modify any of the values of the records in Data Editor, the above actions will exclude accidental changes in the records that are not displayed in the grid.</p>
<p><a href="http://www.devart.com/blogs/dbforge/wp-content/uploads/2012/01/Data-Editor3.jpg"><img class="aligncenter size-full wp-image-2372" title="Data-Editor-3" src="http://www.devart.com/blogs/dbforge/wp-content/uploads/2012/01/Data-Editor3.jpg" alt="Data-Editor-3" width="698" height="159" /></a></p>
<p>Finally, to avoid such problems that may occur when modifying data that was returned as a result of the &#8216;SELECT&#8217; statement inside of which the &#8216;WHERE&#8217; clause is used, make sure you&#8217;re specifying the &#8216;*&#8217; in the &#8216;SELECT&#8217; clause or at least all the columns listed in the &#8216;WHERE&#8217; clause of the statement.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devart.com/blogs/dbforge/index.php/mind-data-modifications-via-data-editor-in-dbforge-studio-for-mysql.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get 20% off on any Devart product (expires January 10th)!</title>
		<link>http://www.devart.com/blogs/dbforge/index.php/get-20-off-on-any-devart-product-expires-january-10th.html</link>
		<comments>http://www.devart.com/blogs/dbforge/index.php/get-20-off-on-any-devart-product-expires-january-10th.html#comments</comments>
		<pubDate>Wed, 14 Dec 2011 15:58:36 +0000</pubDate>
		<dc:creator>julias</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.devart.com/blogs/dbforge/?p=2344</guid>
		<description><![CDATA[Merry Christmas and Happy New Year! As Christmas holidays are drawing closer, we offer you to get 20% off any product license order. Don’t think twice, just save 20%. And what more, you get free access to all future releases of the respective products for one year. Hurry up, this offer is available only from [...]]]></description>
			<content:encoded><![CDATA[<h3>Merry Christmas and Happy New Year!</h3>
<p>As Christmas holidays are drawing closer, we offer you to get <font color="red"><strong>20% off</strong></font> any product license order. </p>
<p>Don’t think twice, just save 20%. And what more, you get free access to all future releases of the respective products for one year.</p>
<p><img src="http://www.devart.com/blogs/dbforge/wp-content/uploads/2011/12/holly_discount.jpg" alt="Get 20% discount!" style="float:right;"/></p>
<p>Hurry up, this offer is available only from <strong>December 01, 2011 till January 10, 2012</strong>. Decide and order right now.</p>
<p>We wish you all the best in the coming year, let joy and happiness be your constant partners and friends! </p>
<p>Best Christmas Wishes,<br />
Devart Team</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devart.com/blogs/dbforge/index.php/get-20-off-on-any-devart-product-expires-january-10th.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Debugging Methods Overview</title>
		<link>http://www.devart.com/blogs/dbforge/index.php/mysql-debugging-methods-overview.html</link>
		<comments>http://www.devart.com/blogs/dbforge/index.php/mysql-debugging-methods-overview.html#comments</comments>
		<pubDate>Fri, 23 Sep 2011 14:08:55 +0000</pubDate>
		<dc:creator>.jp</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[debugging]]></category>

		<guid isPermaLink="false">http://www.devart.com/blogs/dbforge/?p=1959</guid>
		<description><![CDATA[The article describes the ways to debug MySQL stored routines with a GUI tool.]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction</strong><br />
Debugging SQL code is a very important task these days. Unfortunately not all database servers support this feature. And MySQL is one of such servers. In spite of its wide feature set, <em>debugging is not implemented in it</em>. So the problem is that  MySQL provides <em>no API functionalities for code debugging</em>. But the necessity to debug SQL code does not disappear and becomes more and more important each year. Some companies that develop tools to access data of MySQL server databases create their own debuggers that solve this problem to some extent.</p>
<p style="text-align: center;"><img class="size-full wp-image-2316 aligncenter" title="How to debug MySQL code?" src="http://www.devart.com/blogs/dbforge/wp-content/uploads/2011/09/MySQL_Debugger.png" alt="MySQL Debugger" width="112" height="120" /></p>
<p><strong>Types of Debuggers</strong><br />
Now we will consider the types of debuggers that can be implemented for MySQL server and principles of their work.<br />
<span id="more-1959"></span><br />
<em>The first way of debugging stored procedures</em> is to divide their code to separate statements and send each statement separately. This way execution is being emulated, because, for example, the same cycles or branches will be executed not on the server side, but by a client itself. And this brings the accuracy of the debugger work into question.</p>
<p><em>The second way of debugging stored procedures</em> is that additional control items are placed near every statement. And with the help of these items the procedure execution can be suspended, but in spite of all this the procedure is executed entirely on the server side.</p>
<p><strong>Advantages and Shortcomings of the Debugging Methods</strong><br />
<em>The first method</em> has its advantages and shortcomings. The great advantage is that no additional code is executed at the server side and the code of the procedure is left unchanged. The shortcoming of this method is that the main amount of code is executed on the client side and not on the server side, and that is an emulation of code execution, but not code execution itself. Because of this the result returned after debugging often differs from the result returned by the server after executing the procedure. And this situation is worsened by the fact that the result of code execution can differ depending on the MySQL server version. For example, in MySQL 4.1 &#8220;NOT&#8221; and &#8220;!&#8221; operators have identical priority, but in the version 5.0 and higher the priority is different, and it is impossible to take into account all such nuances. That&#8217;s why such debugger will return the same result on different server versions, because it will not take into account all refinements of code execution on different servers, and instead will interpret the code on its own.</p>
<p>The advantage of <em>the second method</em> is that the procedure is executed on the server completely, and this guarantees 100% correct result of debugging. Client does not interpret anything and all execution process is controlled by server. That&#8217;s why problems associated with different MySQL server versions are not topical for this kind of debugger. But one should “pay” for the high quality of such debugger, because its main shortcoming is that extra operations should be performed to add control items into the procedure body, even in spite of the fact that these items can be easily added and easily deleted.</p>
<p><strong>Conclusion</strong><br />
One should decide on his or her own what kind of debugger is better for him or her. <a title="MySQL Debugger Tool" href="http://www.devart.com/dbforge/mysql/studio/code-debugger.html">dbForge Studio for MySQL</a> could not allow a user to get wrong results during debugging and that&#8217;s why it chose the second method and created a server side debugger. It sacrificed the convenience to some extent, but gained a great advantage in the accuracy of the debugging results.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devart.com/blogs/dbforge/index.php/mysql-debugging-methods-overview.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>2011 DevProConnections nominates dbForge Studio for MySQL as Best IDE Product!</title>
		<link>http://www.devart.com/blogs/dbforge/index.php/dbforge-studio-for-mysql-is-nominated-in-2011-devproconnections-as-best-ide-product.html</link>
		<comments>http://www.devart.com/blogs/dbforge/index.php/dbforge-studio-for-mysql-is-nominated-in-2011-devproconnections-as-best-ide-product.html#comments</comments>
		<pubDate>Tue, 16 Aug 2011 14:41:23 +0000</pubDate>
		<dc:creator>.jp</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MySQL GUI client]]></category>

		<guid isPermaLink="false">http://www.devart.com/blogs/dbforge/?p=2294</guid>
		<description><![CDATA[Support Your Favorite Devart Products in 2011 DevProConnections Voting! We would like to invite you to take part in 2011 DevProConnections voting. The Community Choice Awards, as presented by Windows IT Pro, SQL Server Magazine, and DevProConnections, allow you to decide, which IT products get chosen for acclaim and recognition. This year Devart dbForge Studio [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_2300" class="wp-caption alignleft" style="width: 173px"><a href="http://www.devart.com/dbforge/mysql/studio/"><img class="size-full wp-image-2300" title="dbForge Studio for MySQL - Best IDE Product" src="http://www.devart.com/blogs/dbforge/wp-content/uploads/2011/08/dbForge_Studio_for_MySQL_Best_IDE_Product.png" alt="dbForge Studio for MySQL - Best IDE Product" width="163" height="312" /></a><p class="wp-caption-text">dbForge Studio for MySQL - Best IDE Product</p></div>
<h2><span><span style="color: #1f93d3; font-size: small;"></p>
<div><strong>Support Your Favorite Devart Products in 2011  DevProConnections Voting!</strong></div>
<p></span></span></h2>
<p><span><span style="color: #61778d;">We would  like to invite you to take part in <strong>2011 DevProConnections</strong> voting. The Community Choice Awards,  as presented by Windows IT Pro, SQL Server Magazine, and DevProConnections,  allow you to decide, which IT products get chosen for acclaim and recognition. </span></span></p>
<p><span><span style="color: #61778d;"><br />
</span></span></p>
<p><span><span style="color: #61778d;">This year <strong>Devart dbForge Studio for MySQL</strong> is nominated in the following  category.</span> </span></p>
<h3><span><span style="color: #1f93d3;">2011  DevProConnections Community Choice Awards:</span></span></h3>
<p><span><span style="color: #61778d;"><span style="color: #61778d;"><span style="color: #61778d;"><span style="color: #61778d;"><span style="font-family: Verdana,Tahoma,Sans-serif;"><em>Category 14  (page 2): Best IDE Product</em> &#8211; dbForge Studio for MySQL</span></span></span></span></span></span></p>
<p><span><span style="color: #61778d;"><span style="color: #61778d;"><span style="color: #61778d;"><span style="color: #61778d;"><span style="font-family: Verdana,Tahoma,Sans-serif;"> </span></span></span></span></span></span></p>
<p><span><span style="color: #61778d;"><span style="color: #61778d;"><span style="color: #61778d;"><span style="color: #61778d;"><span style="color: #61778d;"><span style="color: #1f93d3;"><span style="color: #61778d;"><span style="color: #61778d;"><span style="color: #61778d;"><span style="color: #61778d;"><span style="font-family: Verdana,Tahoma,Sans-serif;">If you think that Devart&#8217;s MySQL GUI Client is worth  of being the best in the given categories, vote now for your favourite Devart  products:</span> </span></span></span></span></span></span></span></span></span></span></span></p>
<p><span><span style="color: #61778d;"><span style="color: #61778d;"><span style="color: #61778d;"><span style="color: #61778d;"><span style="color: #61778d;"><span style="color: #1f93d3;"><span style="color: #61778d;"><span style="color: #61778d;"><span style="color: #61778d;"><span style="color: #61778d;"><span style="font-family: Verdana,Tahoma,Sans-serif;"><a href="http://www.surveymonkey.com/s/devproconnections-communitychoice2011-finalvoting">2011  DevProConnections Community Choice Awards</a></span></span></span></span></span></span></span></span></span></span></span></span></p>
<p><span><span style="color: #61778d;"><span style="color: #61778d;"><span style="color: #61778d;"><span style="color: #61778d;"><span style="color: #61778d;"><span style="color: #1f93d3;"><span style="color: #61778d;"><span style="color: #61778d;"><span style="color: #61778d;"><span style="color: #61778d;"><span style="font-family: Verdana,Tahoma,Sans-serif;"><em><span style="color: #61778d;">With Best Wishes,<br />
The Devart Team</span></em></span></span></span></span></span></span></span></span></span></span></span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.devart.com/blogs/dbforge/index.php/dbforge-studio-for-mysql-is-nominated-in-2011-devproconnections-as-best-ide-product.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>dbForge Studio for MySql on Linux family operating systems</title>
		<link>http://www.devart.com/blogs/dbforge/index.php/dbforge-studio-mysql-on-linux-operating-systems.html</link>
		<comments>http://www.devart.com/blogs/dbforge/index.php/dbforge-studio-mysql-on-linux-operating-systems.html#comments</comments>
		<pubDate>Wed, 22 Jun 2011 09:30:48 +0000</pubDate>
		<dc:creator>Alexander Asotikov</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.devart.com/blogs/dbforge/?p=2254</guid>
		<description><![CDATA[Despite the fact that dbForge products were developed only for Windows platforms, our active users (thanks to Tsvetkov) have found a way to use some features of dbForge Studio for MySql on Linux family operating systems. Tests were run under .Net Framework 2.0 on Wine emulator. The following command line functionality works with no visible [...]]]></description>
			<content:encoded><![CDATA[<p>Despite the fact that dbForge products were developed only for Windows platforms, our active users (thanks to Tsvetkov) have found a way to use some features of <strong>dbForge Studio for MySql</strong> on <strong>Linux</strong> family operating systems.</p>
<p>Tests were run under .Net Framework 2.0 on <strong>Wine</strong> emulator.</p>
<p>The following <strong>command line</strong> functionality <strong>works</strong> with no visible issues:</p>
<ul>
<li>/backup &#8211; backups a database</li>
<li>/restore &#8211; restores a database</li>
<li>/datacompare &#8211; launches a data comparison</li>
<li>/datacompare /sync &#8211; launches a database synchronization</li>
<li>/schemacompare &#8211; launches a schema comparison</li>
<li>/schemacompare /sync &#8211; launches a database synchronization</li>
<li>/dataexport (starting from version 5.0) &#8211; exports data</li>
<li>/dataimport (starting from version 5.0) &#8211; imports data</li>
<li>/execute &#8211; executes a script</li>
</ul>
<p>Testing of the following<strong> GUI</strong> functionality completed with full <strong>success</strong>:</p>
<ul>
<li>Import Wizard</li>
<li>Export Wizard</li>
<li>Backup Wizard</li>
<li>Restore Wizard</li>
<li>SQL Formatter Wizard</li>
</ul>
<p><strong>Data comparison</strong>. We were able to perform data comparison operation with some limitations:</p>
<ul>
<li>there is no possibility to view differences between the records of the relevant objects</li>
<li>Data Synchronization Wizard doesn&#8217;t work at all</li>
</ul>
<p><strong>Schema comparison</strong>. Testing of the schema comparison functionality finished with the following results:</p>
<ul>
<li>Schema Comparison Wizard works properly</li>
<li>Schema Synchronization Wizard is supported excepting the possibility to view synchronization script for the object. However, you can save documents and use them as a command line argument</li>
</ul>
<p><strong>Stored procedures debugger</strong>. Works properly if you disregard the artifacts.</p>
<p>The rest of the functionality is associated with tool-windows or documents and mostly blocked because of problems with rendering. To avoid the issues associated with tool-windows, change the window status from Docked to Floating and vice versa.</p>
<p>If you are interested in using <strong>dbForge Studio for MySql</strong> on <strong>Linux</strong>, you can use the following <strong>installation </strong>recommendations:</p>
<p>1. Build wine with the following options:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">app-emulation<span style="color: #000000; font-weight: bold;">/</span>wine-1.3.3 <span style="color: #007800;">USE</span>=<span style="color: #ff0000;">&quot;X alsa dbus gecko jpeg ncurses opengl perl png ssl threads
truetype win32 xinerama xml (-capi) -cups -custom-cflags (-esd) -fontconfig -gnutls
(-gphoto2) -gsm (-hal) -jack -lcms -ldap -mp3 -nas -openal -oss -pulseaudio -samba (-scanner)
 -test -win64 -xcomposite&quot;</span></pre></div></div>

<p>2. Install to a new folder .wine files (optionally, but preferably)</p>
<p>3. Run:</p>

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

<p>Note: Do not use gdiplus from wine (dbforge crashes with an error when starting)</p>
<p>4. Install dotnet20 (in Fedora13 the installation interrupts with an error):</p>

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

<p>5. Run:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">wine .<span style="color: #000000; font-weight: bold;">/</span>dbforgemysqlru.exe <span style="color: #7a0874; font-weight: bold;">&#40;</span>installs with no visible issues<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.devart.com/blogs/dbforge/index.php/dbforge-studio-mysql-on-linux-operating-systems.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Comic video about developing dbForge Studio for MySQL</title>
		<link>http://www.devart.com/blogs/dbforge/index.php/comic-video-about-developing-dbforge-studio-for-mysql.html</link>
		<comments>http://www.devart.com/blogs/dbforge/index.php/comic-video-about-developing-dbforge-studio-for-mysql.html#comments</comments>
		<pubDate>Fri, 17 Jun 2011 10:09:37 +0000</pubDate>
		<dc:creator>.jp</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MySQL GUI client]]></category>

		<guid isPermaLink="false">http://www.devart.com/blogs/dbforge/?p=2243</guid>
		<description><![CDATA[Our company has been working on its own MySQL GUI client development for over 6 years. Many features were implemented in this product in accordance with our users&#8217; requests, that acted as task originators for us. We are glad that the development process of our MySQL Front-End goes on and on, and we were able [...]]]></description>
			<content:encoded><![CDATA[<p>Our company has been working on its own MySQL GUI client development for over 6 years. Many features were implemented in this product in accordance with our users&#8217; requests, that acted as task originators for us. We are glad that the development process of our MySQL Front-End goes on and on, and we were able to release version 5.0 of the product. For the release of version 5.0, we decided to make a special video telling about the product history. You can see the result.</p>
<div id="attachment_2244" class="wp-caption aligncenter" style="width: 491px"><a href="http://www.youtube.com/user/DevartSoftware#p/a/u/0/fvcGYh0MN98"><img src="http://www.devart.com/blogs/dbforge/wp-content/uploads/2011/06/MySQL-Studio-Developing.png" alt="MySQL-Studio-Developing-video" title="А comic video telling about the product history of dbForge Studio for MySQL" width="481" height="362" class="size-full wp-image-2244" /></a><p class="wp-caption-text">Funny video about history of our MySQL GUI tool</p></div>
<p>We did not intend to have a professional video made by clip-makers. The video was shot frame-by-frame using a common digital camera. After that jpg files were rendered to the mp4 video format. Shooting took almost 7 hours. All models were made by hand from plasticine by one of our employees, whose hobby is design and model-making. All of us want to thank him for this!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devart.com/blogs/dbforge/index.php/comic-video-about-developing-dbforge-studio-for-mysql.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Export a MySQL Table to a CSV File Methods Overview</title>
		<link>http://www.devart.com/blogs/dbforge/index.php/export-mysql-table-to-csv-file-methods-overview.html</link>
		<comments>http://www.devart.com/blogs/dbforge/index.php/export-mysql-table-to-csv-file-methods-overview.html#comments</comments>
		<pubDate>Mon, 30 May 2011 08:15:42 +0000</pubDate>
		<dc:creator>.jp</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[CSV]]></category>
		<category><![CDATA[data export]]></category>

		<guid isPermaLink="false">http://www.devart.com/blogs/dbforge/?p=1741</guid>
		<description><![CDATA[In this article we describe benefits and shortcomings of different ways of exporting data from a MySQL table to the CSV format.]]></description>
			<content:encoded><![CDATA[<p>A comma-separated values (<strong>CSV</strong>) file is a simple <strong>file format</strong> that is widely supported, so it is often used to move tabular data between different computer programs that support the format. <strong>CSV file</strong> is a text format for a database table. Each record in the table is one line of the text file. Each field value of a record is separated from the next with a comma. For example, a CSV file might be used to transfer information from a database to a spreadsheet or another database. Of course, there are more advanced formats to store data, for example, XML, but CSV does have one advantage over XML. CSV has much lower overhead, thereby using much less bandwidth and storage than XML.</p>
<h4>Now let&#8217;s analyse how one can save data from a MySQL table to a CSV file.</h4>
<p><span id="more-1741"></span><br />
<strong>The first</strong> and very likely the easiest way is to change Storage Engine to CSV and save it to some archived file with such name as <em>table_name.CSV</em>. To do this it is necessary to execute:</p>

<div class="wp_syntax"><div class="code"><pre class="plsql" style="font-family:monospace;"><span style="color: #00F;">ALTER</span> <span style="color: #00F;">TABLE</span> table_name ENGINE<span style="color: #00F;">=</span>CSV<span style="color: #00F;">;</span></pre></div></div>

<p>If we execute such statement for the <em>sakila.actor</em> table, we will instantly get the &#8220;<strong>Cannot delete or update a parent row: a foreign key constraint.</strong>&#8221; message.<br />
OK, let&#8217;s delete all foreign keys referencing this table and execute the DDL statement once more. Now we will get the &#8220;<strong>The used table type doesn&#8217;t support AUTO_INCREMENT columns.</strong>&#8221; message.<br />
Let&#8217;s remove the AUTO_INCREMENT property from the <em>actor_id</em> column and try to execute our statement again. Now we get the &#8220;<strong>Too many keys specified; max 0 keys allowed</strong>&#8221; message.<br />
So we should delete all indexes, unique keys, and primary keys, and only after this you get a CSV file you can work with on the server machine.<br />
As we can see, this is not a very <strong>easy way of saving MySQL table data</strong> to the CSV format, because we had to ruin referential integrity of our database and make too many changes to the schema created in the first place. The second shortcoming is that it is impossible to save N number of rows.</p>
<p><strong>The second</strong> way does not have the shortcomings listed above. To perform the requested operation, you should execute:</p>

<div class="wp_syntax"><div class="code"><pre class="plsql" style="font-family:monospace;"><span style="color: #00F;">SELECT</span> <span style="color: #00F;">*</span> <span style="color: #00F;">INTO</span> OUTFILE <span style="color: #F00;">'sakila_actor.csv'</span> <span style="color: #00F;">FROM</span> sakila<span style="color: #00F;">.</span>actor<span style="color: #00F;">;</span></pre></div></div>

<p>But by default the field delimiter is TAB, data is saved without quoting, and information regarding date and time is saved in an unusual format. That&#8217;s why it is necessary to customize the settings in the following way:</p>

<div class="wp_syntax"><div class="code"><pre class="plsql" style="font-family:monospace;"><span style="color: #00F;">SELECT</span> actor_id<span style="color: #00F;">,</span> first_name<span style="color: #00F;">,</span> last_name<span style="color: #00F;">,</span> DATE_FORMAT<span style="color: #00F;">&#40;</span>last_update<span style="color: #00F;">,</span><span style="color: #F00;">'%m/%d/%Y %H:%i:%s'</span><span style="color: #00F;">&#41;</span>
<span style="color: #00F;">INTO</span> OUTFILE <span style="color: #F00;">'sakila_actor.csv'</span>
FIELDS TERMINATED <span style="color: #00F;">BY</span> <span style="color: #F00;">','</span> OPTIONALLY ENCLOSED <span style="color: #00F;">BY</span> <span style="color: #F00;">'&quot;'</span> LINES TERMINATED <span style="color: #00F;">BY</span> <span style="color: #F00;">'<span style="color: #000; font-weight: bold;">\n</span>'</span>
<span style="color: #00F;">FROM</span> sakila<span style="color: #00F;">.</span>actor
LIMIT <span style="color: #800;">10</span><span style="color: #00F;">;</span></pre></div></div>

<p>Excellent! Now we can save the needed fields and the needed number of table rows.<br />
And this way also has some shortcomings. For example, it is <strong>impossible to execute</strong> this statement several times. In this case the &#8220;<strong>File &#8216;sakila_actor.csv&#8217; already exists</strong>&#8221; error arises. But the common shortcoming of both these ways is that the file is always <strong>saved on the server side</strong>. Not all users that have <strong>permissions to select data</strong> have access to the file system.</p>
<h4>We offer you a way that doesn&#8217;t have any shortcomings mentioned above.</h4>
<p>Let&#8217;s see how easy it is just to <strong>export data</strong> from a MySQL table to the CSV format and save the resulting file locally using a <a title="MySQL Data Export Import Tool" href="http://www.devart.com/dbforge/mysql/studio/data-export-import.html">dbForge Studio for MySQL</a>.</p>
<p>Select the needed table in Database Explorer and select where to export data from the popup menu.</p>
<div id="attachment_2238" class="wp-caption aligncenter" style="width: 573px"><a href="http://www.devart.com/blogs/dbforge/wp-content/uploads/2011/05/Export-Data-Menu.png"><img src="http://www.devart.com/blogs/dbforge/wp-content/uploads/2011/05/Export-Data-Menu.png" alt="MySQL Data Export: Context Menu" title="MySQL Data Export: Context Menu" width="563" height="369" class="size-full wp-image-2238" /></a><p class="wp-caption-text">MySQL Data Export: Context Menu</p></div>
<p>After that in Data Export Wizard that appeared select the needed format – CSV.</p>
<div id="attachment_1748" class="wp-caption aligncenter" style="width: 483px"><a href="http://www.devart.com/blogs/dbforge/wp-content/uploads/2010/08/DataExportWizardCsvFormat.png"><img class="size-full wp-image-1748" title="MySQL Data Export Wizard: CSV Format" src="http://www.devart.com/blogs/dbforge/wp-content/uploads/2010/08/DataExportWizardCsvFormat.png" alt="MySQL Data Export Wizard: CSV Format" width="473" height="392" /></a><p class="wp-caption-text">MySQL Data Export Wizard: CSV Format</p></div>
<p>On the next page of the wizard we can set the column separator and quote string we need, but as the preset variant is suitable for us, we go to the next page of the wizard.</p>
<div id="attachment_1749" class="wp-caption aligncenter" style="width: 483px"><a href="http://www.devart.com/blogs/dbforge/wp-content/uploads/2010/08/DataExportWizardColumnSeparatorQuoteString.png"><img class="size-full wp-image-1749" title="MySQL Data Export Wizard: Column Separator and Quote String" src="http://www.devart.com/blogs/dbforge/wp-content/uploads/2010/08/DataExportWizardColumnSeparatorQuoteString.png" alt="MySQL Data Export Wizard: Column Separator and Quote String" width="473" height="392" /></a><p class="wp-caption-text">MySQL Data Export Wizard: Column Separator and Quote String</p></div>
<p>On the Data Format page you can set the format in which integer and float numbers, empty strings, date and time should be saved, but as the preset format is suitable for us, we go to the next page of the wizard.</p>
<div id="attachment_1750" class="wp-caption aligncenter" style="width: 483px"><a href="http://www.devart.com/blogs/dbforge/wp-content/uploads/2010/08/DataExportWizardDateTimeFormat.png"><img class="size-full wp-image-1750" title="MySQL Data Export Wizard: Date and Time Format" src="http://www.devart.com/blogs/dbforge/wp-content/uploads/2010/08/DataExportWizardDateTimeFormat.png" alt="MySQL Data Export Wizard: Date and Time Format" width="473" height="392" /></a><p class="wp-caption-text">MySQL Data Export Wizard: Date and Time Format</p></div>
<p>On the next page we can limit the number of exported rows and press the data export button.</p>
<div id="attachment_1751" class="wp-caption aligncenter" style="width: 482px"><a href="http://www.devart.com/blogs/dbforge/wp-content/uploads/2010/08/DataExportWizardRangeOfRows.png"><img class="size-full wp-image-1751" title="MySQL Data Export Wizard: Range of Rows" src="http://www.devart.com/blogs/dbforge/wp-content/uploads/2010/08/DataExportWizardRangeOfRows.png" alt="MySQL Data Export Wizard: Range of Rows" width="472" height="391" /></a><p class="wp-caption-text">MySQL Data Export Wizard: Range of Rows</p></div>
<p>OK! The data was <strong>successfully exported to a CSV file</strong>. If you want, you can save the settings specified earlier as a template and use them when exporting data from this or any other table next time.</p>
<div id="attachment_1752" class="wp-caption aligncenter" style="width: 483px"><a href="http://www.devart.com/blogs/dbforge/wp-content/uploads/2010/08/DataExportWizardExportFinishSaveTemplate.png"><img class="size-full wp-image-1752" title="MySQL Data Export Wizard: Export Finish and Save Template" src="http://www.devart.com/blogs/dbforge/wp-content/uploads/2010/08/DataExportWizardExportFinishSaveTemplate.png" alt="MySQL Data Export Wizard: Export Finish and Save Template" width="473" height="393" /></a><p class="wp-caption-text">MySQL Data Export Wizard: Export Finish and Save Template</p></div>
<p>Of course, it is not necessary to perform all these tiresome steps and it is possible to click the export button on the first page of the wizard.</p>
<p>Our tool supports <strong>command line</strong> in the 5 version of dbForge Studio for MySQL to save export project and to start export of data from the needed tables and in the set cyclic periods of time or in the specified time with the help of Windows Scheduler.</p>
<p>What do you think about the ways of data export described in this article? How do you usually export data?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devart.com/blogs/dbforge/index.php/export-mysql-table-to-csv-file-methods-overview.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>MySQL GUI: dbForge Studio for MySQL &#8211; new cutting-edge version released!</title>
		<link>http://www.devart.com/blogs/dbforge/index.php/mysql-gui-dbforge-studio-for-mysql-new-cutting-edge-version-released.html</link>
		<comments>http://www.devart.com/blogs/dbforge/index.php/mysql-gui-dbforge-studio-for-mysql-new-cutting-edge-version-released.html#comments</comments>
		<pubDate>Tue, 19 Apr 2011 14:19:09 +0000</pubDate>
		<dc:creator>.jp</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.devart.com/blogs/dbforge/?p=2225</guid>
		<description><![CDATA[In the new version we made a lot of improvements and added a whole pack of new features in almost all dbForge Studio&#8217;s tools. And the most remarkable thing about this release is that nearly all novelties were suggested by our users. So we hope they will enjoy working with the new version and feel [...]]]></description>
			<content:encoded><![CDATA[<p>In the new version we made a lot of improvements and added a whole pack of new features in almost all dbForge Studio&#8217;s tools. And the most remarkable thing about this release is that nearly all novelties were suggested by our users. So we hope they will enjoy working with the new version and feel that they have contributed a lot to make it as it is.</p>
<div id="attachment_2228" class="wp-caption aligncenter" style="width: 560px"><a href="http://www.devart.com/dbforge/mysql/studio/overview.html"><img src="http://www.devart.com/blogs/dbforge/wp-content/uploads/2011/04/cutting-edge-mysql-gui-client.png" alt="Cutting-Edge MySQL GUI Client: dbForge Studio for MySQL" title="Cutting-Edge MySQL GUI Client: dbForge Studio for MySQL" width="550" height="426" class="size-full wp-image-2228" /></a><p class="wp-caption-text">Cutting-Edge MySQL GUI Client: dbForge Studio for MySQL</p></div>
<p>With the help of our users we could work on the product on the new level, and as a result of such successful tight cooperation its standard of quality grew. This new standard includes taking into account actual needs of people using our product and implementing their exact requirements except studying the market in general and implementing features that are theoretically demanded.</p>
<p>When you open the application to get acquainted with the new version, you will be surely stunned and pleasantly surprised by its new look. When you start using it, we hope you will be thrilled by the inner improvements and make the best use of them:<br />
<span id="more-2225"></span><br />
    <strong>Dependencies List</strong></p>
<p>    First of all, test the usability of Dependencies List &#8211; a unique feature that will allow you to see the object&#8217;s references and dependants. No more need to spend precious minutes on looking all this up!</p>
<p>    <strong>Full support for MySQL server 5.5</strong></p>
<p>    <strong>Master-Detail Data Browser</strong></p>
<p>    You are welcome to explore and analyze master-detail data in a browser with rich settings, and save your data and diagrams for future use.</p>
<p>   <strong> Enhanced Data Editor</strong></p>
<p>    Foreign key lookup editor was added. Resources of client machines will be spared with server-side sorting and filtering. Data Editor now informs about its state. Capabilities to edit tables in join statements, to number records, copy data with header, and build graphical representation of data with a wizard are now available.</p>
<p>   <strong> Improved Security Manager</strong></p>
<p>    Maintaining server security is one of the most responsible tasks. We did our best to make it easier by redesigning Security Manager. Now you can edit several users at once, group them by hosts, and grant definite sets of privileges with the help of virtual roles.</p>
<p>    <strong>Data Export and Import improvements</strong></p>
<p>    Export data from several tables at once and save your time by exporting and importing data through the command line.</p>
<p>    <strong>Object Viewer </strong>- a simple way to view object&#8217;s details</p>
<p>    Object Viewer (formerly known as Summary Window) was totally redesigned to provide an easier way for analyzing objects and their structure.</p>
<p>    <strong>Appearance improvements</strong></p>
<p>    Brand new start page for quick access to the most frequently used features and new skins for a better look.</p>
<p>    <strong>Other improvements</strong></p>
<p>        Ability to view internal SQL queries that are sent to the server with parameter&#8217;s values added<br />
        Few UI improvements in Database Explorer were made<br />
        Options to ignore clauses during the comparison of events added to the Schema Comparison wizard<br />
        Highlighting of differences on comparing SQL profiling results added<br />
        More informative progress during Schema and Data comparison</p>
<p><strong>Availability</strong></p>
<p>Consumers can give the updated dbForge Studio for MySQL a test drive by downloading the free Express edition or the 30-day trial Professional edition at the <a href="http://www.devart.com/dbforge/mysql/studio/download.html">product download page</a>. dbForge Studio license price starts at $49.95.</p>
<p>To leave feedback, users can go to the <a href="http://www.devart.com/dbforge/mysql/studio/feedback.html">dbForge Studio for MySQL feedback page</a>. The Devart team is looking forward to receiving any comments and suggestions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devart.com/blogs/dbforge/index.php/mysql-gui-dbforge-studio-for-mysql-new-cutting-edge-version-released.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GUI Tool for MySQL: dbForge Studio for MySQL, v4.50.342 Released</title>
		<link>http://www.devart.com/blogs/dbforge/index.php/gui-tool-for-mysql-dbforge-studio-for-mysql-v4-50-342-released.html</link>
		<comments>http://www.devart.com/blogs/dbforge/index.php/gui-tool-for-mysql-dbforge-studio-for-mysql-v4-50-342-released.html#comments</comments>
		<pubDate>Fri, 18 Mar 2011 12:00:12 +0000</pubDate>
		<dc:creator>.jp</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[query builder]]></category>
		<category><![CDATA[schema comparison]]></category>

		<guid isPermaLink="false">http://www.devart.com/blogs/dbforge/?p=2214</guid>
		<description><![CDATA[Changes (as compared to 4.50.339) include: Bug fixes: * The error on entering selection criteria after selecting Group By fields in Query Builder fixed (T26884) * The problem with showing 0 as a parameter value instead of NULL in the parameter editor fixed (T26867) * Removing field&#8217;s autoincrement sign on adding index in the table [...]]]></description>
			<content:encoded><![CDATA[<p>Changes (as compared to 4.50.339) include:<br />
<em>Bug fixes:</em><br />
* The error on entering selection criteria after selecting Group By fields in Query Builder fixed (T26884)<br />
* The problem with showing 0 as a parameter value instead of NULL in the parameter editor fixed (T26867)<br />
* Removing field&#8217;s autoincrement sign on adding index in the table fixed (T24859)<br />
* Extra new line on copying data from a cell in Data Editor removed (T27021)<br />
* The problem with losing ON UPDATE CURRENT_TIMESTAMP during editing a table fixed (T27090)<br />
* The problems with connecting to MySQL Server via SSH tunnel fixed (T26911, T20079)<br />
* InvalidOperationExceptions on generating schema synchronization script in the Schema Comparison tool fixed (T27106, T27108)</p>
<p>Downloads: <a href="http://www.devart.com/dbforge/mysql/studio/download.html">http://www.devart.com/dbforge/mysql/studio/download.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.devart.com/blogs/dbforge/index.php/gui-tool-for-mysql-dbforge-studio-for-mysql-v4-50-342-released.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Get a List of Permissions of MySQL Users</title>
		<link>http://www.devart.com/blogs/dbforge/index.php/how-to-get-a-list-of-permissions-of-mysql-users.html</link>
		<comments>http://www.devart.com/blogs/dbforge/index.php/how-to-get-a-list-of-permissions-of-mysql-users.html#comments</comments>
		<pubDate>Tue, 11 Jan 2011 14:53:16 +0000</pubDate>
		<dc:creator>.jp</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[data reports]]></category>

		<guid isPermaLink="false">http://www.devart.com/blogs/dbforge/?p=2115</guid>
		<description><![CDATA[In this article Devart describes how you can create a list of privileges of MySQL database users with the help of a data reports tool.]]></description>
			<content:encoded><![CDATA[<p>MySQL has advanced database access system. A database user can have access to the whole database, separate tables, or to separate columns of tables. Also there is a restriction for actions a user may perform with records. MySQL server uses several tables in a special database to organize such a complicated database access structure. The access policy is based on the values available in these tables.</p>
<p>The database that MySQL server uses to store internal data about users is called <em>mysql</em> by default. There are tables for storing information about users&#8217; accounts in this database:<br />
<span id="more-2115"></span></p>
<ul>
<li><i><strong>user</strong></i> contains a list of all users of the MySQL server and their permissions to access the database;</li>
<li><i><strong>db</strong></i> contains a list of databases with a matching list of database users and their privileges for executing operations;</li>
<li><i><strong>tables_priv</strong></i> contains a list of database tables (views) that a user has access to;</li>
<li><i><strong>columns_priv</strong></i> contains a list of columns from the database tables (views) a user has access to;</li>
<li><i><strong>procs_priv</strong></i> contains a list of database procedures (functions) a user has access to.</li>
<p>To get the list of users&#8217; privileges concerning data access, the following queries may be executed:</p>
<ul>
<li>the list of global privileges:</li>

<div class="wp_syntax"><div class="code"><pre class="plsql" style="font-family:monospace;">  <span style="color: #00F;">SELECT</span>
  mu<span style="color: #00F;">.</span>host `Host`<span style="color: #00F;">,</span>
  mu<span style="color: #00F;">.</span><span style="color: #000;">USER</span> `<span style="color: #000;">USER</span>`<span style="color: #00F;">,</span>
  <span style="color: #000;">REPLACE</span><span style="color: #00F;">&#40;</span><span style="color: #000;">RTRIM</span><span style="color: #00F;">&#40;</span><span style="color: #000;">CONCAT</span><span style="color: #00F;">&#40;</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>mu<span style="color: #00F;">.</span>Select_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Select '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>mu<span style="color: #00F;">.</span>Insert_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Insert '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>mu<span style="color: #00F;">.</span>Update_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Update '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>mu<span style="color: #00F;">.</span>Delete_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Delete '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>mu<span style="color: #00F;">.</span>Create_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Create '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>mu<span style="color: #00F;">.</span>Drop_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Drop '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>mu<span style="color: #00F;">.</span>Reload_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Reload '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>mu<span style="color: #00F;">.</span>Shutdown_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Shutdown '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>mu<span style="color: #00F;">.</span>Process_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Process '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>mu<span style="color: #00F;">.</span>File_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'File '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>mu<span style="color: #00F;">.</span>Grant_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Grant '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>mu<span style="color: #00F;">.</span>References_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'References '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>mu<span style="color: #00F;">.</span>Index_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Index '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>mu<span style="color: #00F;">.</span>Alter_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Alter '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>mu<span style="color: #00F;">.</span>Show_db_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Show_db '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>mu<span style="color: #00F;">.</span>Super_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Super '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>mu<span style="color: #00F;">.</span>Create_tmp_table_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Create_tmp_table '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>mu<span style="color: #00F;">.</span>Lock_tables_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Lock_tables '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>mu<span style="color: #00F;">.</span>Execute_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Execute '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>mu<span style="color: #00F;">.</span>Repl_slave_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Repl_slave '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>mu<span style="color: #00F;">.</span>Repl_client_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Repl_client '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>mu<span style="color: #00F;">.</span>Create_view_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Create_view '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>mu<span style="color: #00F;">.</span>Show_view_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Show_view '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>mu<span style="color: #00F;">.</span>Create_routine_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Create_routine '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>mu<span style="color: #00F;">.</span>Alter_routine_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Alter_routine '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>mu<span style="color: #00F;">.</span>Create_user_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Create_user '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>mu<span style="color: #00F;">.</span>Event_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Event '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>mu<span style="color: #00F;">.</span>Trigger_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Trigger '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span>
  <span style="color: #00F;">&#41;</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span> <span style="color: #F00;">' '</span><span style="color: #00F;">,</span> <span style="color: #F00;">', '</span><span style="color: #00F;">&#41;</span> <span style="color: #00F;">AS</span> `Privileges`
 <span style="color: #00F;">FROM</span>
  mysql<span style="color: #00F;">.</span><span style="color: #000;">USER</span> mu
 <span style="color: #00F;">ORDER</span> <span style="color: #00F;">BY</span>
  mu<span style="color: #00F;">.</span>Host<span style="color: #00F;">,</span>
  mu<span style="color: #00F;">.</span><span style="color: #000;">USER</span></pre></div></div>

<li>the list of privileges for a database:</li>

<div class="wp_syntax"><div class="code"><pre class="plsql" style="font-family:monospace;"> <span style="color: #00F;">SELECT</span> 
  md<span style="color: #00F;">.</span>host `Host`<span style="color: #00F;">,</span>
  md<span style="color: #00F;">.</span><span style="color: #000;">USER</span> `<span style="color: #000;">USER</span>`<span style="color: #00F;">,</span>
  md<span style="color: #00F;">.</span>db `Database`<span style="color: #00F;">,</span>
  <span style="color: #000;">REPLACE</span><span style="color: #00F;">&#40;</span><span style="color: #000;">RTRIM</span><span style="color: #00F;">&#40;</span><span style="color: #000;">CONCAT</span><span style="color: #00F;">&#40;</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>md<span style="color: #00F;">.</span>Select_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Select '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>md<span style="color: #00F;">.</span>Insert_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Insert '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>md<span style="color: #00F;">.</span>Update_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Update '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>md<span style="color: #00F;">.</span>Delete_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Delete '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>md<span style="color: #00F;">.</span>Create_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Create '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>md<span style="color: #00F;">.</span>Drop_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Drop '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>md<span style="color: #00F;">.</span>Grant_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Grant '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>md<span style="color: #00F;">.</span>References_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'References '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>md<span style="color: #00F;">.</span>Index_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Index '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>md<span style="color: #00F;">.</span>Alter_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Alter '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>md<span style="color: #00F;">.</span>Create_tmp_table_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Create_tmp_table '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>md<span style="color: #00F;">.</span>Lock_tables_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Lock_tables '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>md<span style="color: #00F;">.</span>Create_view_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Create_view '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>md<span style="color: #00F;">.</span>Show_view_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Show_view '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>md<span style="color: #00F;">.</span>Create_routine_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Create_routine '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>md<span style="color: #00F;">.</span>Alter_routine_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Alter_routine '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>md<span style="color: #00F;">.</span>Execute_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Execute '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>md<span style="color: #00F;">.</span>Event_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Event '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span>
  <span style="color: #00F;">IF</span><span style="color: #00F;">&#40;</span>md<span style="color: #00F;">.</span>Trigger_priv <span style="color: #00F;">=</span> <span style="color: #F00;">'Y'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'Trigger '</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span>
  <span style="color: #00F;">&#41;</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">,</span> <span style="color: #F00;">' '</span><span style="color: #00F;">,</span> <span style="color: #F00;">', '</span><span style="color: #00F;">&#41;</span> <span style="color: #00F;">AS</span> `Privileges`
 <span style="color: #00F;">FROM</span>
  mysql<span style="color: #00F;">.</span>db md
 <span style="color: #00F;">ORDER</span> <span style="color: #00F;">BY</span>
  md<span style="color: #00F;">.</span>Host<span style="color: #00F;">,</span>
  md<span style="color: #00F;">.</span><span style="color: #000;">USER</span><span style="color: #00F;">,</span>
  md<span style="color: #00F;">.</span>Db</pre></div></div>

<li>the list of privileges for tables:</li>

<div class="wp_syntax"><div class="code"><pre class="plsql" style="font-family:monospace;"> <span style="color: #00F;">SELECT</span> 
  mt<span style="color: #00F;">.</span>host `Host`<span style="color: #00F;">,</span>
  mt<span style="color: #00F;">.</span><span style="color: #000;">USER</span> `<span style="color: #000;">USER</span>`<span style="color: #00F;">,</span>
  <span style="color: #000;">CONCAT</span><span style="color: #00F;">&#40;</span>mt<span style="color: #00F;">.</span>Db<span style="color: #00F;">,</span> <span style="color: #F00;">'.'</span><span style="color: #00F;">,</span> mt<span style="color: #00F;">.</span>Table_name<span style="color: #00F;">&#41;</span> `Tables`<span style="color: #00F;">,</span>
  <span style="color: #000;">REPLACE</span><span style="color: #00F;">&#40;</span>mt<span style="color: #00F;">.</span>Table_priv<span style="color: #00F;">,</span> <span style="color: #F00;">','</span><span style="color: #00F;">,</span> <span style="color: #F00;">', '</span><span style="color: #00F;">&#41;</span> <span style="color: #00F;">AS</span> `Privileges`
 <span style="color: #00F;">FROM</span>
  mysql<span style="color: #00F;">.</span>tables_priv mt
 <span style="color: #00F;">WHERE</span>
  mt<span style="color: #00F;">.</span>Table_name <span style="color: #00F;">IN</span>
  <span style="color: #00F;">&#40;</span><span style="color: #00F;">SELECT</span>
  <span style="color: #00F;">DISTINCT</span>
    t<span style="color: #00F;">.</span>table_name `tables`
  <span style="color: #00F;">FROM</span>
    information_schema<span style="color: #00F;">.</span>tables <span style="color: #00F;">AS</span> t
  <span style="color: #00F;">WHERE</span>
    t<span style="color: #00F;">.</span>table_type <span style="color: #00F;">IN</span>
    <span style="color: #00F;">&#40;</span><span style="color: #F00;">'BASE TABLE'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'SYSTEM VIEW'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'TEMPORARY'</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span> <span style="color: #00F;">OR</span>
    t<span style="color: #00F;">.</span>table_type <span style="color: #00F;">&lt;&gt;</span> <span style="color: #F00;">'VIEW'</span> <span style="color: #00F;">AND</span>
    t<span style="color: #00F;">.</span>create_options <span style="color: #00F;">IS</span> <span style="color: #00F;">NOT</span> <span style="color: #00F;">NULL</span>
  <span style="color: #00F;">&#41;</span>
 <span style="color: #00F;">ORDER</span> <span style="color: #00F;">BY</span>
  mt<span style="color: #00F;">.</span>Host<span style="color: #00F;">,</span>
  mt<span style="color: #00F;">.</span><span style="color: #000;">USER</span><span style="color: #00F;">,</span>
  mt<span style="color: #00F;">.</span>Db<span style="color: #00F;">,</span>
  mt<span style="color: #00F;">.</span>Table_name<span style="color: #00F;">;</span></pre></div></div>

<li>the list of privileges for views:</li>

<div class="wp_syntax"><div class="code"><pre class="plsql" style="font-family:monospace;"> <span style="color: #00F;">SELECT</span> 
  mv<span style="color: #00F;">.</span>host `Host`<span style="color: #00F;">,</span>
  mv<span style="color: #00F;">.</span><span style="color: #000;">USER</span> `<span style="color: #000;">USER</span>`<span style="color: #00F;">,</span>
  <span style="color: #000;">CONCAT</span><span style="color: #00F;">&#40;</span>mv<span style="color: #00F;">.</span>Db<span style="color: #00F;">,</span> <span style="color: #F00;">'.'</span><span style="color: #00F;">,</span> mv<span style="color: #00F;">.</span>Table_name<span style="color: #00F;">&#41;</span> `Views`<span style="color: #00F;">,</span>
  <span style="color: #000;">REPLACE</span><span style="color: #00F;">&#40;</span>mv<span style="color: #00F;">.</span>Table_priv<span style="color: #00F;">,</span> <span style="color: #F00;">','</span><span style="color: #00F;">,</span> <span style="color: #F00;">', '</span><span style="color: #00F;">&#41;</span> <span style="color: #00F;">AS</span> `Privileges`
 <span style="color: #00F;">FROM</span>
  mysql<span style="color: #00F;">.</span>tables_priv mv
 <span style="color: #00F;">WHERE</span>
  mv<span style="color: #00F;">.</span>Table_name <span style="color: #00F;">IN</span>
  <span style="color: #00F;">&#40;</span><span style="color: #00F;">SELECT</span>
  <span style="color: #00F;">DISTINCT</span>
    v<span style="color: #00F;">.</span>table_name `views`
  <span style="color: #00F;">FROM</span>
    information_schema<span style="color: #00F;">.</span>views <span style="color: #00F;">AS</span> v
  <span style="color: #00F;">&#41;</span>
 <span style="color: #00F;">ORDER</span> <span style="color: #00F;">BY</span>
  mv<span style="color: #00F;">.</span>Host<span style="color: #00F;">,</span>
  mv<span style="color: #00F;">.</span><span style="color: #000;">USER</span><span style="color: #00F;">,</span>
  mv<span style="color: #00F;">.</span>Db<span style="color: #00F;">,</span>
  mv<span style="color: #00F;">.</span>Table_name<span style="color: #00F;">;</span></pre></div></div>

<li>the list of privileges for table columns:</li>

<div class="wp_syntax"><div class="code"><pre class="plsql" style="font-family:monospace;"><span style="color: #00F;">SELECT</span> 
  mtc<span style="color: #00F;">.</span>host `Host`<span style="color: #00F;">,</span>
  mtc<span style="color: #00F;">.</span><span style="color: #000;">USER</span> `<span style="color: #000;">USER</span>`<span style="color: #00F;">,</span>
  <span style="color: #000;">CONCAT</span><span style="color: #00F;">&#40;</span>mtc<span style="color: #00F;">.</span>Db<span style="color: #00F;">,</span> <span style="color: #F00;">'.'</span><span style="color: #00F;">,</span> mtc<span style="color: #00F;">.</span>Table_name<span style="color: #00F;">,</span> <span style="color: #F00;">'.'</span><span style="color: #00F;">,</span> mtc<span style="color: #00F;">.</span>Column_name<span style="color: #00F;">&#41;</span> `Tables Columns`<span style="color: #00F;">,</span>
  <span style="color: #000;">REPLACE</span><span style="color: #00F;">&#40;</span>mtc<span style="color: #00F;">.</span>Column_priv<span style="color: #00F;">,</span> <span style="color: #F00;">','</span><span style="color: #00F;">,</span> <span style="color: #F00;">', '</span><span style="color: #00F;">&#41;</span> <span style="color: #00F;">AS</span> `Privileges`
<span style="color: #00F;">FROM</span>
  mysql<span style="color: #00F;">.</span>columns_priv mtc
<span style="color: #00F;">WHERE</span>
  mtc<span style="color: #00F;">.</span>Table_name <span style="color: #00F;">IN</span>
  <span style="color: #00F;">&#40;</span><span style="color: #00F;">SELECT</span>
  <span style="color: #00F;">DISTINCT</span>
    t<span style="color: #00F;">.</span>table_name `tables`
  <span style="color: #00F;">FROM</span>
    information_schema<span style="color: #00F;">.</span>tables <span style="color: #00F;">AS</span> t
  <span style="color: #00F;">WHERE</span>
    t<span style="color: #00F;">.</span>table_type <span style="color: #00F;">IN</span>
    <span style="color: #00F;">&#40;</span><span style="color: #F00;">'BASE TABLE'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'SYSTEM VIEW'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'TEMPORARY'</span><span style="color: #00F;">,</span> <span style="color: #F00;">''</span><span style="color: #00F;">&#41;</span> <span style="color: #00F;">OR</span>
    t<span style="color: #00F;">.</span>table_type <span style="color: #00F;">&lt;&gt;</span> <span style="color: #F00;">'VIEW'</span> <span style="color: #00F;">AND</span>
    t<span style="color: #00F;">.</span>create_options <span style="color: #00F;">IS</span> <span style="color: #00F;">NOT</span> <span style="color: #00F;">NULL</span>
  <span style="color: #00F;">&#41;</span>
<span style="color: #00F;">ORDER</span> <span style="color: #00F;">BY</span>
  mtc<span style="color: #00F;">.</span>Host<span style="color: #00F;">,</span>
  mtc<span style="color: #00F;">.</span><span style="color: #000;">USER</span><span style="color: #00F;">,</span>
  mtc<span style="color: #00F;">.</span>Db<span style="color: #00F;">,</span>
  mtc<span style="color: #00F;">.</span>Table_name<span style="color: #00F;">,</span>
  mtc<span style="color: #00F;">.</span>Column_name<span style="color: #00F;">;</span></pre></div></div>

<li>the list of privileges for view columns:</li>

<div class="wp_syntax"><div class="code"><pre class="plsql" style="font-family:monospace;"> <span style="color: #00F;">SELECT</span>
  mvc<span style="color: #00F;">.</span>host `Host`<span style="color: #00F;">,</span>
  mvc<span style="color: #00F;">.</span><span style="color: #000;">USER</span> `<span style="color: #000;">USER</span>`<span style="color: #00F;">,</span>
  <span style="color: #000;">CONCAT</span><span style="color: #00F;">&#40;</span>mvc<span style="color: #00F;">.</span>Db<span style="color: #00F;">,</span> <span style="color: #F00;">'.'</span><span style="color: #00F;">,</span> mvc<span style="color: #00F;">.</span>Table_name<span style="color: #00F;">,</span> <span style="color: #F00;">'.'</span><span style="color: #00F;">,</span> mvc<span style="color: #00F;">.</span>Column_name<span style="color: #00F;">&#41;</span> `Views Columns`<span style="color: #00F;">,</span>
  <span style="color: #000;">REPLACE</span><span style="color: #00F;">&#40;</span>mvc<span style="color: #00F;">.</span>Column_priv<span style="color: #00F;">,</span> <span style="color: #F00;">','</span><span style="color: #00F;">,</span> <span style="color: #F00;">', '</span><span style="color: #00F;">&#41;</span> <span style="color: #00F;">AS</span> `Privileges`
 <span style="color: #00F;">FROM</span>
  mysql<span style="color: #00F;">.</span>columns_priv mvc
 <span style="color: #00F;">WHERE</span>
  mvc<span style="color: #00F;">.</span>Table_name <span style="color: #00F;">IN</span>
  <span style="color: #00F;">&#40;</span><span style="color: #00F;">SELECT</span>
  <span style="color: #00F;">DISTINCT</span>
    v<span style="color: #00F;">.</span>table_name `views`
  <span style="color: #00F;">FROM</span>
    information_schema<span style="color: #00F;">.</span>views <span style="color: #00F;">AS</span> v
  <span style="color: #00F;">&#41;</span>
 <span style="color: #00F;">ORDER</span> <span style="color: #00F;">BY</span>
  mvc<span style="color: #00F;">.</span>Host<span style="color: #00F;">,</span>
  mvc<span style="color: #00F;">.</span><span style="color: #000;">USER</span><span style="color: #00F;">,</span>
  mvc<span style="color: #00F;">.</span>Db<span style="color: #00F;">,</span>
  mvc<span style="color: #00F;">.</span>Table_name<span style="color: #00F;">,</span>
  mvc<span style="color: #00F;">.</span>Column_name<span style="color: #00F;">;</span></pre></div></div>

<li>the list of privileges for procedures:</li>

<div class="wp_syntax"><div class="code"><pre class="plsql" style="font-family:monospace;"> <span style="color: #00F;">SELECT</span>
  mp<span style="color: #00F;">.</span>host `Host`<span style="color: #00F;">,</span>
  mp<span style="color: #00F;">.</span><span style="color: #000;">USER</span> `<span style="color: #000;">USER</span>`<span style="color: #00F;">,</span>
  <span style="color: #000;">CONCAT</span><span style="color: #00F;">&#40;</span>mp<span style="color: #00F;">.</span>Db<span style="color: #00F;">,</span> <span style="color: #F00;">'.'</span><span style="color: #00F;">,</span> mp<span style="color: #00F;">.</span>Routine_name<span style="color: #00F;">&#41;</span> `Procedures`<span style="color: #00F;">,</span>
  <span style="color: #000;">REPLACE</span><span style="color: #00F;">&#40;</span>mp<span style="color: #00F;">.</span>Proc_priv<span style="color: #00F;">,</span> <span style="color: #F00;">','</span><span style="color: #00F;">,</span> <span style="color: #F00;">', '</span><span style="color: #00F;">&#41;</span> <span style="color: #00F;">AS</span> `Privileges`
 <span style="color: #00F;">FROM</span>
  mysql<span style="color: #00F;">.</span>procs_priv mp
 <span style="color: #00F;">WHERE</span>
  mp<span style="color: #00F;">.</span>Routine_type <span style="color: #00F;">=</span> <span style="color: #F00;">'PROCEDURE'</span>
 <span style="color: #00F;">ORDER</span> <span style="color: #00F;">BY</span>
  mp<span style="color: #00F;">.</span>Host<span style="color: #00F;">,</span>
  mp<span style="color: #00F;">.</span><span style="color: #000;">USER</span><span style="color: #00F;">,</span>
  mp<span style="color: #00F;">.</span>Db<span style="color: #00F;">,</span>
  mp<span style="color: #00F;">.</span>Routine_name<span style="color: #00F;">;</span></pre></div></div>

<li>the list of privileges for functions:</li>

<div class="wp_syntax"><div class="code"><pre class="plsql" style="font-family:monospace;"> <span style="color: #00F;">SELECT</span>
  mf<span style="color: #00F;">.</span>host `Host`<span style="color: #00F;">,</span>
  mf<span style="color: #00F;">.</span><span style="color: #000;">USER</span> `<span style="color: #000;">USER</span>`<span style="color: #00F;">,</span>
  <span style="color: #000;">CONCAT</span><span style="color: #00F;">&#40;</span>mf<span style="color: #00F;">.</span>Db<span style="color: #00F;">,</span> <span style="color: #F00;">'.'</span><span style="color: #00F;">,</span> mf<span style="color: #00F;">.</span>Routine_name<span style="color: #00F;">&#41;</span> `Procedures`<span style="color: #00F;">,</span>
  <span style="color: #000;">REPLACE</span><span style="color: #00F;">&#40;</span>mf<span style="color: #00F;">.</span>Proc_priv<span style="color: #00F;">,</span> <span style="color: #F00;">','</span><span style="color: #00F;">,</span> <span style="color: #F00;">', '</span><span style="color: #00F;">&#41;</span> <span style="color: #00F;">AS</span> `Privileges`
 <span style="color: #00F;">FROM</span>
  mysql<span style="color: #00F;">.</span>procs_priv mf
 <span style="color: #00F;">WHERE</span>
  mf<span style="color: #00F;">.</span>Routine_type <span style="color: #00F;">=</span> <span style="color: #F00;">'FUNCTION'</span>
 <span style="color: #00F;">ORDER</span> <span style="color: #00F;">BY</span>
  mf<span style="color: #00F;">.</span>Host<span style="color: #00F;">,</span>
  mf<span style="color: #00F;">.</span><span style="color: #000;">USER</span><span style="color: #00F;">,</span>
  mf<span style="color: #00F;">.</span>Db<span style="color: #00F;">,</span>
  mf<span style="color: #00F;">.</span>Routine_name<span style="color: #00F;">;</span></pre></div></div>

</ul>
<p>You may need to create a decent printable report with this data, and to give it as a report, for example, by the demand of a customer or authority. For this purpose you may use a special <a href="http://www.devart.com/dbforge/mysql/studio/overview.html">MySQL GUI tool</a> that includes a <a href="http://www.devart.com/dbforge/mysql/studio/data-reports.html">data report designer</a>. </p>
<p>If you have ready queries, you can make advantage of an easy-to-use wizard and create a report using a predefined template and data grouped, for example, by host, in several minutes.</p>
<div id="attachment_2149" class="wp-caption aligncenter" style="width: 540px"><a href="http://www.devart.com/blogs/dbforge/wp-content/uploads/2010/12/New_Data_Report_menu.png"><img src="http://www.devart.com/blogs/dbforge/wp-content/uploads/2010/12/New_Data_Report_menu.png" alt="New Data Report menu" title="New Data Report menu" width="530" height="343" class="size-full wp-image-2149" /></a><p class="wp-caption-text">New Data Report menu</p></div>
<div id="attachment_2150" class="wp-caption aligncenter" style="width: 539px"><a href="http://www.devart.com/blogs/dbforge/wp-content/uploads/2010/12/Data_Report_Wizard.png"><img src="http://www.devart.com/blogs/dbforge/wp-content/uploads/2010/12/Data_Report_Wizard.png" alt="Data Report Wizard" title="Data Report Wizard" width="529" height="434" class="size-full wp-image-2150" /></a><p class="wp-caption-text">Data Report Wizard</p></div>
<div id="attachment_2151" class="wp-caption aligncenter" style="width: 538px"><a href="http://www.devart.com/blogs/dbforge/wp-content/uploads/2010/12/Data_Report_Custom_Query.png"><img src="http://www.devart.com/blogs/dbforge/wp-content/uploads/2010/12/Data_Report_Custom_Query.png" alt="Data Report Custom Query" title="Data Report Custom Query" width="528" height="433" class="size-full wp-image-2151" /></a><p class="wp-caption-text">Data Report Custom Query</p></div>
<div id="attachment_2152" class="wp-caption aligncenter" style="width: 538px"><a href="http://www.devart.com/blogs/dbforge/wp-content/uploads/2010/12/Data_Report_Load_Query.png"><img src="http://www.devart.com/blogs/dbforge/wp-content/uploads/2010/12/Data_Report_Load_Query.png" alt="Data Report Load Query" title="Data Report Load Query" width="528" height="433" class="size-full wp-image-2152" /></a><p class="wp-caption-text">Data Report Load Query</p></div>
<div id="attachment_2153" class="wp-caption aligncenter" style="width: 539px"><a href="http://www.devart.com/blogs/dbforge/wp-content/uploads/2010/12/Data_Report_Group_by_Host.png"><img src="http://www.devart.com/blogs/dbforge/wp-content/uploads/2010/12/Data_Report_Group_by_Host.png" alt="Data Report Group by Host" title="Data Report Group by Host" width="529" height="433" class="size-full wp-image-2153" /></a><p class="wp-caption-text">Data Report Group by Host</p></div>
<div id="attachment_2154" class="wp-caption aligncenter" style="width: 539px"><a href="http://www.devart.com/blogs/dbforge/wp-content/uploads/2010/12/Data_Report_Title.png"><img src="http://www.devart.com/blogs/dbforge/wp-content/uploads/2010/12/Data_Report_Title.png" alt="Data Report Title" title="Data Report Title" width="529" height="433" class="size-full wp-image-2154" /></a><p class="wp-caption-text">Data Report Title</p></div>
<div id="attachment_2155" class="wp-caption aligncenter" style="width: 522px"><a href="http://www.devart.com/blogs/dbforge/wp-content/uploads/2010/12/Data_Report_Preview.png"><img src="http://www.devart.com/blogs/dbforge/wp-content/uploads/2010/12/Data_Report_Preview.png" alt="Data Report Preview" title="Data Report Preview" width="512" height="590" class="size-full wp-image-2155" /></a><p class="wp-caption-text">Data Report Preview</p></div>
<p>As you can see on these screenshots, we have created a report using dbForge Studio&#8217;s wizard without tedious designing the report itself.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devart.com/blogs/dbforge/index.php/how-to-get-a-list-of-permissions-of-mysql-users.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

