<?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>LAMP Tips! &#187; MySQL</title>
	<atom:link href="http://lamptips.com/category/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://lamptips.com</link>
	<description>Tips for Linux, Apache (and Nginx!), MySQL and PHP!</description>
	<lastBuildDate>Sun, 05 Feb 2012 07:54:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>MySQL/General &#8211; Database + Index + Total Size</title>
		<link>http://lamptips.com/2012/01/mysqlgeneral-database-index-total-size/</link>
		<comments>http://lamptips.com/2012/01/mysqlgeneral-database-index-total-size/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 06:56:10 +0000</pubDate>
		<dc:creator>LampTips</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[size]]></category>

		<guid isPermaLink="false">http://lamptips.com/?p=29</guid>
		<description><![CDATA[<a href="http://lamptips.com/2012/01/mysqlgeneral-database-index-total-size/" title="MySQL/General - Database + Index + Total Size"></a>Ever need to find the Data+Index size for your DB?  Try this query: SELECT DBName, CONCAT(LPAD(FORMAT(SDSize/POWER(1024,pw),3),17,' '),' ',SUBSTR(' KMGTP',pw+1,1),'B') "Data Size", CONCAT(LPAD(FORMAT(SXSize/POWER(1024,pw),3),17,' '),' ',SUBSTR(' KMGTP',pw+1,1),'B') "Index Size", CONCAT(LPAD(FORMAT(STSize/POWER(1024,pw),3),17,' '),' ',SUBSTR(' KMGTP',pw+1,1),'B') "Total Size" FROM ( SELECT IFNULL(DB,'All Databases') DBName, SUM(DSize) &#8230;<p class="read-more"><a href="http://lamptips.com/2012/01/mysqlgeneral-database-index-total-size/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://lamptips.com/2012/01/mysqlgeneral-database-index-total-size/" title="MySQL/General - Database + Index + Total Size"></a><p>Ever need to find the Data+Index size for your DB?<br />
<span id="more-29"></span> Try this query:</p>
<pre>SELECT DBName,
  CONCAT(LPAD(FORMAT(SDSize/POWER(1024,pw),3),17,' '),' ',SUBSTR(' KMGTP',pw+1,1),'B') "Data Size",
  CONCAT(LPAD(FORMAT(SXSize/POWER(1024,pw),3),17,' '),' ',SUBSTR(' KMGTP',pw+1,1),'B') "Index Size",
  CONCAT(LPAD(FORMAT(STSize/POWER(1024,pw),3),17,' '),' ',SUBSTR(' KMGTP',pw+1,1),'B') "Total Size"
FROM (
  SELECT IFNULL(DB,'All Databases') DBName,
  SUM(DSize) SDSize,
  SUM(XSize) SXSize,
  SUM(TSize) STSize
  FROM (
    SELECT table_schema DB,
      data_length DSize,
      index_length XSize,
      data_length+index_length TSize
    FROM information_schema.tables
    WHERE table_schema NOT IN ('mysql','information_schema','performance_schema')) AAA
    GROUP BY DB WITH ROLLUP
) AA,
(SELECT 2 pw) BB
ORDER BY (SDSize+SXSize);</pre>
]]></content:encoded>
			<wfw:commentRss>http://lamptips.com/2012/01/mysqlgeneral-database-index-total-size/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL/Security &#8211; Cleaning up post-install</title>
		<link>http://lamptips.com/2012/01/mysqlsecurity-cleaning-up-post-install/</link>
		<comments>http://lamptips.com/2012/01/mysqlsecurity-cleaning-up-post-install/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 04:42:45 +0000</pubDate>
		<dc:creator>LampTips</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://lamptips.com/?p=18</guid>
		<description><![CDATA[<a href="http://lamptips.com/2012/01/mysqlsecurity-cleaning-up-post-install/" title="MySQL/Security - Cleaning up post-install"></a>A default install of MySQL has anonymous users and root users with access via &#8216;%&#8217; (all outside hosts) and a generally useless &#8216;test&#8217; database.  The best method to do this is to execute the following at the shell prompt: mysql_secure_installation &#8230;<p class="read-more"><a href="http://lamptips.com/2012/01/mysqlsecurity-cleaning-up-post-install/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://lamptips.com/2012/01/mysqlsecurity-cleaning-up-post-install/" title="MySQL/Security - Cleaning up post-install"></a><p>A default install of MySQL has anonymous users and root users with access via &#8216;%&#8217; (all outside hosts) and a generally useless &#8216;test&#8217; database.<br />
<span id="more-18"></span> The best method to do this is to execute the following at the shell prompt:</p>
<pre>mysql_secure_installation</pre>
<p>If this feature is not available, simply execute the following set of queries in MySQL:</p>
<pre>DROP DATABASE `test`;
DELETE FROM `mysql`.`user` WHERE `User` = '';
DELETE FROM `mysql`.`user` WHERE `User` = 'root' AND `Host` != 'localhost';
FLUSH PRIVILEGES;</pre>
]]></content:encoded>
			<wfw:commentRss>http://lamptips.com/2012/01/mysqlsecurity-cleaning-up-post-install/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

