<input type="hidden" id="_wpnonce" name="_wpnonce" value="4a4a67feb4" /><input type="hidden" name="_wp_http_referer" value="/blog/wp-json/wp/v2/posts/2645" /><input type="hidden" id="_wpnonce" name="_wpnonce" value="4a4a67feb4" /><input type="hidden" name="_wp_http_referer" value="/blog/wp-json/wp/v2/posts/2645" />{"id":2645,"date":"2014-08-30T14:36:35","date_gmt":"2014-08-30T04:36:35","guid":{"rendered":"https:\/\/www.businesslegions.com\/blog\/?p=2645"},"modified":"2014-08-30T14:36:35","modified_gmt":"2014-08-30T04:36:35","slug":"free-diskspace-disable-binary-logging-mysql","status":"publish","type":"post","link":"https:\/\/www.businesslegions.com\/blog\/2014\/08\/30\/free-diskspace-disable-binary-logging-mysql\/","title":{"rendered":"WAMP: Free up disk space and disable binary Logging in MySQL"},"content":{"rendered":"<!--CusAds0--><p>Our Windows VPS server was running out of disk space (had only 1GB out of 40GB) and I decided to run a scan to check which files and directories was using the most amount of space. You can use an open source tool called <a title=\"WinDirStat\" href=\"http:\/\/portableapps.com\/apps\/utilities\/windirstat_portable\" target=\"_blank\">WinDirStat Portable<\/a> to run the scan. After you run the scan, the tool will provide you with a snapshot of which folder is using the most amount of data.<\/p>\n<p><a href=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/windirstat.png?strip=all&w=2560\"><img decoding=\"async\" class=\"alignnone  wp-image-2681\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/windirstat.png?strip=all\" alt=\"windirstat\" width=\"477\" height=\"330\" srcset=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/windirstat.png?strip=all 548w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/windirstat-300x207.png?strip=all 300w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/windirstat.png?strip=all&amp;w=109 109w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/windirstat.png?strip=all&amp;w=219 219w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/windirstat.png?strip=all&amp;w=438 438w\" sizes=\"(max-width: 477px) 100vw, 477px\" \/><\/a><\/p>\n<p>What I found most surprising was that the Windows directory had about 21.3GB of data (it was using a whopping 66.4%). If I drilled further into the Windows folder I discovered that WinSxS and sources were the biggest folders.<\/p>\n<p><a href=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/windirstat-windows.png?strip=all&w=2560\"><img decoding=\"async\" class=\"alignnone size-full wp-image-2682\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/windirstat-windows.png?strip=all\" alt=\"windirstat windows\" width=\"558\" height=\"347\" srcset=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/windirstat-windows.png?strip=all 558w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/windirstat-windows-300x187.png?strip=all 300w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/windirstat-windows.png?strip=all&amp;w=111 111w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/windirstat-windows.png?strip=all&amp;w=223 223w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/windirstat-windows.png?strip=all&amp;w=446 446w\" sizes=\"(max-width: 558px) 100vw, 558px\" \/><\/a>S<\/p>\n<p>I decided to put a support call to find out whether these folder were required and the response was:<\/p>\n<blockquote><p><span style=\"color: #000000;\">Please note that the folder &#8216;WinSxS&#8217; is required for proper functioning of the system. The &#8216;WinSxS&#8217; folder helps to let multiple applications run in Windows without any compatibility problem. Its not recommended at all to remove this folder, however you can clean up this folder to save some disk-space. Please refer the following URL for more information regarding this.<\/span><br style=\"color: #000000;\" \/><br style=\"color: #000000;\" \/><span style=\"color: #000000;\">~~~<\/span><br style=\"color: #000000;\" \/><a style=\"color: #1155cc;\" href=\"http:\/\/technet.microsoft.com\/en-us\/library\/dn251565.aspx\" target=\"_blank\">http:\/\/technet.microsoft.com\/<wbr \/>en-us\/library\/dn251565.aspx<\/a><br style=\"color: #000000;\" \/><span style=\"color: #000000;\">~~~<\/span><br style=\"color: #000000;\" \/><br style=\"color: #000000;\" \/><span style=\"color: #000000;\">When considering the &#8216;sources&#8217; folder, although removing it will not affect the system, it is required during processes like repairing the Windows installation.<\/span><\/p><!--CusAds0--><\/blockquote>\n<p>After receiving the response I decided to just leave it alone and concentrate to see what other folders was consuming large amounts of space. That&#8217;s where I found that the WAMP MySQL logging folder (C:\\wamp\\bin\\mysql\\mysql5.5.24\\data) had over 10GB of log information with files such as\u00a0mysql-bin.000001<\/p>\n<p>I decided to do a bit of research find out what these files were for. Apparently they are used for MySQL data recover, the events in the binary log and also used for\u00a0replication.\u00a0I didn&#8217;t use any replication on this VPS server so I decided to stop this logging and delete the log files.<\/p>\n<h1>FREE UP DISK SPACE<\/h1>\n<p>The steps were:<\/p>\n<p>In WAMP manager open the my.ini file (you can manually find the file here C:\\wamp\\bin\\mysql\\mysql5.5.24\\data) and comment the following line:<\/p>\n<div id=\"wpshdo_1\" class=\"wp-synhighlighter-outer\"><div id=\"wpshdt_1\" class=\"wp-synhighlighter-expanded\"><table border=\"0\" width=\"100%\"><tr><td align=\"left\" width=\"80%\"><a name=\"#codesyntax_1\"><\/a><a id=\"wpshat_1\" class=\"wp-synhighlighter-title\" href=\"#codesyntax_1\"  onClick=\"javascript:wpsh_toggleBlock(1)\" title=\"Click to show\/hide code block\">Source code<\/a><\/td><td align=\"right\"><a href=\"#codesyntax_1\" onClick=\"javascript:wpsh_code(1)\" title=\"Show code only\"><img decoding=\"async\" border=\"0\" style=\"border: 0 none\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/themes\/default\/images\/code.png?strip=all&w=960\" \/><\/a>&nbsp;<a href=\"#codesyntax_1\" onClick=\"javascript:wpsh_print(1)\" title=\"Print code\"><img decoding=\"async\" border=\"0\" style=\"border: 0 none\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/themes\/default\/images\/printer.png?strip=all&w=960\" \/><\/a>&nbsp;<a href=\"https:\/\/www.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/About.html\" target=\"_blank\" title=\"Show plugin information\"><img decoding=\"async\" border=\"0\" style=\"border: 0 none\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/themes\/default\/images\/info.gif?strip=all&w=960\" \/><\/a>&nbsp;<\/td><\/tr><\/table><\/div><div id=\"wpshdi_1\" class=\"wp-synhighlighter-inner\" style=\"display: block;\"><pre class=\"php\" style=\"font-family:monospace;\">log<span class=\"sy0\">-<\/span>bin<span class=\"sy0\">=<\/span>mysql<span class=\"sy0\">-<\/span>bin<\/pre><\/div><\/div>\n<p>So it should look like<\/p>\n<div id=\"wpshdo_2\" class=\"wp-synhighlighter-outer\"><div id=\"wpshdt_2\" class=\"wp-synhighlighter-expanded\"><table border=\"0\" width=\"100%\"><tr><td align=\"left\" width=\"80%\"><a name=\"#codesyntax_2\"><\/a><a id=\"wpshat_2\" class=\"wp-synhighlighter-title\" href=\"#codesyntax_2\"  onClick=\"javascript:wpsh_toggleBlock(2)\" title=\"Click to show\/hide code block\">Source code<\/a><\/td><td align=\"right\"><a href=\"#codesyntax_2\" onClick=\"javascript:wpsh_code(2)\" title=\"Show code only\"><img decoding=\"async\" border=\"0\" style=\"border: 0 none\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/themes\/default\/images\/code.png?strip=all&w=960\" \/><\/a>&nbsp;<a href=\"#codesyntax_2\" onClick=\"javascript:wpsh_print(2)\" title=\"Print code\"><img decoding=\"async\" border=\"0\" style=\"border: 0 none\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/themes\/default\/images\/printer.png?strip=all&w=960\" \/><\/a>&nbsp;<a href=\"https:\/\/www.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/About.html\" target=\"_blank\" title=\"Show plugin information\"><img decoding=\"async\" border=\"0\" style=\"border: 0 none\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/themes\/default\/images\/info.gif?strip=all&w=960\" \/><\/a>&nbsp;<\/td><\/tr><\/table><\/div><div id=\"wpshdi_2\" class=\"wp-synhighlighter-inner\" style=\"display: block;\"><pre class=\"php\" style=\"font-family:monospace;\"><span class=\"co2\">#log-bin=mysql-bin<\/span><\/pre><\/div><\/div>\n<p>Restart the WAMP service<\/p>\n<p>Then delete files that look similar to:<\/p>\n<pre class=\"lang-sql prettyprint prettyprinted\" style=\"color: #000000;\"><code><span class=\"pln\">mysql-bin<\/span><span class=\"lit\" style=\"color: #800000;\">.000001<\/span><\/code><\/pre>\n<p>After deleting these files I managed to recover 10GB of free space. There were also other log files that I decided to delete from WAMP and they were the Apache log and error log files located here C:\\wamp\\bin\\apache\\apachex.x.xx\\logs (replace x with your version of apache)<\/p>\n<p>Stop the WAMP service and then delete them.<\/p>\n<p>In total I managed to recover 13GB of data and for some reason the server ran much faster.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<div class=\"lt-box\" style=\"border:1px solid #1d6a9e\"><div class=\"lt-box-title\" style=\"background-color:#2485C6;border-top:1px solid #a7cee8;text-shadow:1px 1px 0 #0b283b\">DO YOU LIKE WHAT YOU'VE READ?<\/div><div class=\"lt-box-content\">Join our subscription list and receive our content right in your mailbox. If you like to receive some Great deals our Freebies then subscribe now!\r\n\r\n<p><div class=\"tnp tnp-subscription \">\n<form method=\"post\" action=\"https:\/\/www.businesslegions.com\/blog\/wp-admin\/admin-ajax.php?action=tnp&amp;na=s\">\n<input type=\"hidden\" name=\"nlang\" value=\"\">\n<div class=\"tnp-field tnp-field-firstname\"><label for=\"tnp-1\">Name<\/label>\n<input class=\"tnp-name\" type=\"text\" name=\"nn\" id=\"tnp-1\" value=\"\" placeholder=\"\"><\/div>\n<div class=\"tnp-field tnp-field-email\"><label for=\"tnp-2\">Email<\/label>\n<input class=\"tnp-email\" type=\"email\" name=\"ne\" id=\"tnp-2\" value=\"\" placeholder=\"\" required><\/div>\n<div class=\"tnp-field tnp-field-button\" style=\"text-align: left\"><input class=\"tnp-submit\" type=\"submit\" value=\"Subscribe\" style=\"\">\n<\/div>\n<\/form>\n<\/div>\n<\/p>\r\n\r\n<\/div><\/div><!--CusAds0-->\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>Our Windows VPS server was running out of disk space (had only 1GB out of 40GB) and I decided to run a scan to check which files and directories was using the most amount of space. You can use an open source tool called WinDirStat Portable to run the scan. After you run the scan, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2682,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,1043],"tags":[1607,315,1935,1670,747,1609,1669],"class_list":["post-2645","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology","category-websites","tag-apache","tag-disk-space","tag-free","tag-logging","tag-mysql","tag-wamp","tag-windirstat"],"_links":{"self":[{"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/posts\/2645","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/comments?post=2645"}],"version-history":[{"count":8,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/posts\/2645\/revisions"}],"predecessor-version":[{"id":2686,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/posts\/2645\/revisions\/2686"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/media\/2682"}],"wp:attachment":[{"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/media?parent=2645"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/categories?post=2645"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/tags?post=2645"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}