<?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>SurlyJake &#187; MySQL</title>
	<atom:link href="http://www.surlyjake.com/tag/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.surlyjake.com</link>
	<description></description>
	<lastBuildDate>Fri, 30 Dec 2011 15:28:12 +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>Uninstall MySQL 5 from Debian</title>
		<link>http://www.surlyjake.com/2008/09/uninstall-mysql-5-from-debian/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=uninstall-mysql-5-from-debian</link>
		<comments>http://www.surlyjake.com/2008/09/uninstall-mysql-5-from-debian/#comments</comments>
		<pubDate>Sat, 27 Sep 2008 14:12:32 +0000</pubDate>
		<dc:creator>jacob</dc:creator>
				<category><![CDATA[Debian Etch]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Samba]]></category>
		<category><![CDATA[Zabbix]]></category>
		<category><![CDATA[apt]]></category>
		<category><![CDATA[Debian]]></category>

		<guid isPermaLink="false">http://www.surlyjake.com/?p=34</guid>
		<description><![CDATA[I completely. completely messed up MySQL. Badly. I wiped out the data directory (/var/lib/mysql in Debian) and the went to remove mysql &#8230; apt-get remove --purge mysql-server That only deleted something like 86K. dissapointing. It looks like &#8220;mysql-server&#8221; is a shortcut pointing to the latest version of the software. The real software is found  under [...]]]></description>
			<content:encoded><![CDATA[<p>I completely. <span style="text-decoration: underline;">completely </span>messed up <a href="http://www.surlyjake.com/tag/mysql/" class="st_tag internal_tag" rel="tag" title="Posts tagged with MySQL">MySQL</a>. Badly. I wiped out the data directory (/var/lib/<a href="http://www.surlyjake.com/tag/mysql/" class="st_tag internal_tag" rel="tag" title="Posts tagged with MySQL">mysql</a> in <a href="http://www.surlyjake.com/tag/debian/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Debian">Debian</a>) and the went to remove mysql &#8230;<br />
<code><a href="http://www.surlyjake.com/tag/apt/" class="st_tag internal_tag" rel="tag" title="Posts tagged with apt">apt</a>-get remove --purge mysql-server<br />
</code><br />
That only deleted something like 86K. dissapointing. It looks like &#8220;mysql-server&#8221; is a shortcut pointing to the latest version of the software. The real software is found  under the name &#8220;mysql-server-50&#8243;. So what made it happen was:<br />
<code>apt-get remove --purge mysql-server*<br />
</code><br />
That&#8217;ll wipe out whatever mysql install is in place.</p>
<div class="none"><div class="g-plusone" data-href="http://www.surlyjake.com/2008/09/uninstall-mysql-5-from-debian/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.surlyjake.com/2008/09/uninstall-mysql-5-from-debian/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>FreeBSD MYSQL configuration</title>
		<link>http://www.surlyjake.com/2008/09/freebsd-mysql-configuration/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=freebsd-mysql-configuration</link>
		<comments>http://www.surlyjake.com/2008/09/freebsd-mysql-configuration/#comments</comments>
		<pubDate>Fri, 26 Sep 2008 23:27:49 +0000</pubDate>
		<dc:creator>jacob</dc:creator>
				<category><![CDATA[FreeBSD7]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[FreeBSD 7]]></category>

		<guid isPermaLink="false">http://www.surlyjake.com/?p=26</guid>
		<description><![CDATA[FreeBSD does not automatically include a default my.cnf for MySQL. Instead, a set of sample configuration files can be found under /usr/local/share/mysql. These configuration files include my-small.cnf, my-medium.cnf, my-large.cnf, my-innodb-heavy-4G, and my-huge.cnf. The appropriate file can be copied and used as a template configuration by performing the following actions: cd /usr/local/share/mysql/ cp /usr/local/share/mysq/mysql-large.cnf /etc/my.cnf /usr/local/etc/rc.d/mysql-server [...]]]></description>
			<content:encoded><![CDATA[<div class="storycontent">
<p>FreeBSD does not automatically include a default <code>my.cnf</code> for <a href="http://www.surlyjake.com/tag/mysql/" class="st_tag internal_tag" rel="tag" title="Posts tagged with MySQL">MySQL</a>. Instead, a set of sample configuration files can be found under <code>/usr/local/share/mysql</code>. These configuration files include <code>my-small.cnf</code>, <code>my-medium.cnf</code>, <code>my-large.cnf</code>, <code>my-innodb-heavy-4G</code>, and <code>my-huge.cnf</code>. The appropriate file can be copied and used as a template configuration by performing the following actions:<br />
<code>cd /usr/local/share/mysql/<br />
cp /usr/local/share/mysq/mysql-large.cnf /etc/my.cnf<br />
/usr/local/etc/rc.d/mysql-server restart</code></p>
<p>thanks to <a href="http://www.barik.net/archive/2008/05/26/114616/" target="_blank">http://www.barik.net/archive/2008/05/26/114616/</a> for the tip.</div>
<div class="none"><div class="g-plusone" data-href="http://www.surlyjake.com/2008/09/freebsd-mysql-configuration/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.surlyjake.com/2008/09/freebsd-mysql-configuration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>what not to do in MySQL&#8230; and how to pick up the pieces</title>
		<link>http://www.surlyjake.com/2008/09/what-not-to-do-in-mysql-and-how-to-pick-up-the-pieces/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=what-not-to-do-in-mysql-and-how-to-pick-up-the-pieces</link>
		<comments>http://www.surlyjake.com/2008/09/what-not-to-do-in-mysql-and-how-to-pick-up-the-pieces/#comments</comments>
		<pubDate>Wed, 17 Sep 2008 03:31:13 +0000</pubDate>
		<dc:creator>jacob</dc:creator>
				<category><![CDATA[FreeBSD7]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[FreeBSD 7]]></category>
		<category><![CDATA[recovery]]></category>

		<guid isPermaLink="false">http://www.surlyjake.com/?p=14</guid>
		<description><![CDATA[note to self&#8230; do NOT kill mysql processes from phpmyadmin&#8217;s control panel and force mysql to quit. Bad things happen. In this case, mysql wouldnt start again. InnoDB&#8217;s indexes, binary logs, etc. were all out of sync. The 20 page log explaining all the ways the DB couldn&#8217;t start is located in the DB&#8217;s data [...]]]></description>
			<content:encoded><![CDATA[<p>note to self&#8230; do NOT kill <a href="http://www.surlyjake.com/tag/mysql/" class="st_tag internal_tag" rel="tag" title="Posts tagged with MySQL">mysql</a> processes from phpmyadmin&#8217;s control panel and force <a href="http://www.surlyjake.com/tag/mysql/" class="st_tag internal_tag" rel="tag" title="Posts tagged with MySQL">mysql</a> to quit. Bad things happen. In this case, <a href="http://www.surlyjake.com/tag/mysql/" class="st_tag internal_tag" rel="tag" title="Posts tagged with MySQL">mysql</a> wouldnt start again. InnoDB&#8217;s indexes, binary logs, etc. were all out of sync. The 20 page log explaining all the ways the DB couldn&#8217;t start is located in the DB&#8217;s data dir, which in my case was in /dbdisks/&lt;hostname&gt;.err.</p>
<p>To tell mysql to pick up the messy pieces and throw up whats left of your data, edit or create /etc/my.cnf and add this little line to the &#8220;[mysqld]&#8221; section:</p>
<p><code>innodb_force_<a href="http://www.surlyjake.com/tag/recovery/" class="st_tag internal_tag" rel="tag" title="Posts tagged with recovery">recovery</a> = 3<br />
</code></p>
<p>The command is talked aboot <a href="http://dev.mysql.com/doc/refman/5.0/en/forcing-recovery.html" target="_blank">here</a> the number is btw 1 and 6. bigger the number, the more drastic and desperate it is. I tried 4, and it pulled the tables with no data. 1 gave me nothing. but 3 let me start and mysqldump my <a href="http://www.surlyjake.com/tag/database/" class="st_tag internal_tag" rel="tag" title="Posts tagged with database">database</a>.</p>
<p><code>mysqldump -u root -p &lt;dbname &gt; /path/to/.sql/file<br />
</code></p>
<p>so once the dump was completed, i moved the db data directory, commented out the &#8220;innodb_force_recovery&#8221; line, and restarted the computer. At restart the db data dir was re-created by mysql. fresh and clean. this deletes EVERYTHING. even users. re-import the data with</p>
<p><code>mysql -u root &lt;dbname&gt; &lt; /path/to/.sql/file<br />
</code></p>
<p>go ahead and create the users needed, and set root password again. There you go.</p>
<div class="none"><div class="g-plusone" data-href="http://www.surlyjake.com/2008/09/what-not-to-do-in-mysql-and-how-to-pick-up-the-pieces/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.surlyjake.com/2008/09/what-not-to-do-in-mysql-and-how-to-pick-up-the-pieces/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

