<?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>Tim's Weblog &#187; lenny</title>
	<atom:link href="http://blog.hokkertjes.nl/tag/lenny/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.hokkertjes.nl</link>
	<description>Random Thoughts and Rants</description>
	<lastBuildDate>Fri, 23 Jul 2010 11:41:07 +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>MyLVMbackup: Making it cooperate with Debian</title>
		<link>http://blog.hokkertjes.nl/2009/02/24/mylvmbackup-making-it-cooperate-with-debian/</link>
		<comments>http://blog.hokkertjes.nl/2009/02/24/mylvmbackup-making-it-cooperate-with-debian/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 13:54:05 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[etch]]></category>
		<category><![CDATA[lenny]]></category>
		<category><![CDATA[mylvmbackup]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[package]]></category>

		<guid isPermaLink="false">http://blog.hokkertjes.nl/?p=740</guid>
		<description><![CDATA[For making a consistent backup of MySQL data, mylvmbackup seems to be a great tool. It&#8217;s written in Perl and does what you would expect: Lock the tables, flush them all to disk, make a LVM snapshot and release the tables, recover the InnoDB log,make the backup from the snapshot, remove the snapshot. Minimal downtime [...]]]></description>
			<content:encoded><![CDATA[<p>For making a consistent backup of MySQL data, <a href="https://launchpad.net/mylvmbackup">mylvmbackup</a> seems to be a great tool. It&#8217;s written in Perl and does what you would expect: Lock the tables, flush them all to disk, make a LVM snapshot and release the tables, recover the InnoDB log,make the backup from the snapshot, remove the snapshot. Minimal downtime and still a consistent backup. Although it&#8217;s fairly new, it looks good.</p>
<p>There&#8217;s even a Debian package for it, but that doesn&#8217;t really contain everything I need. First of all, I need a package that runs on Etch. There&#8217;s a dependency in the Debian package (which is for Lenny) on an asciidoc of a version that&#8217;s available only in Lenny. I don&#8217;t really see why that dependency is there at all, but when removing the version, the package still works as expected.</p>
<p>Also, I made two patches of which one is not needed at all, but I left it in there anyway, because it doesn&#8217;t break anything. It simply adds the &#8211;innodb-file-per-table option to the invocation of the mysqld_safe daemon, but that&#8217;s not needed since it only affects MySQL when you change data. But since mysqld_safe is used to recover from logs, you won&#8217;t be changing data. I left it in there anyway. You can find the dpatch file <a href="http://tim.hokkertjes.nl/mylvmbackup-patches/03_add_innodb-file-per-table_option.dpatch">here</a>.</p>
<p>The second one might be more interesting. The mysql-server-5.0 package from Debian creates a file /etc/mysql/debian.cnf with login details for the debian-sys-maint user. This user also has enough permissions to do all the things necessary for manipulating the database when we want to make a backup with mylvmbackup. Normally, mylvmbackup needs you to give it user details for a privileged user in /etc/mylvmbackup.conf, which is a bit double, since the debian.cnf exists. So my patch adds a &#8211;defaults_file option which allows you to mention the debian.cnf. No need for more passwords in plaintext on the filesystem! You can either give this option no the commandline or in the mylvmbackup.conf in the [mysql] section. It only supports Debian style debian.cnf, though, since it searched for a [client] section in the file you mention. You can find the patch <a href="http://tim.hokkertjes.nl/mylvmbackup-patches/04_use_defaults-file_by_default.dpatch">here</a>.</p>
<p>A working package can be found in <a href="http://debian.kumina.nl">Kumina&#8217;s Debian repository</a> for both etch and lenny. Please let me know if this works for you! It&#8217;s my first Perl, though, so be warned. If stuff breaks&#8230; Well&#8230; Sorry&#8230; So be sure to test it.</p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Tags: <a class='technorati-link' href='http://technorati.com/tag/backup' rel='tag' target='_self'>backup</a>, <a class='technorati-link' href='http://technorati.com/tag/configuration' rel='tag' target='_self'>configuration</a>, <a class='technorati-link' href='http://technorati.com/tag/debian' rel='tag' target='_self'>debian</a>, <a class='technorati-link' href='http://technorati.com/tag/etch' rel='tag' target='_self'>etch</a>, <a class='technorati-link' href='http://technorati.com/tag/lenny' rel='tag' target='_self'>lenny</a>, <a class='technorati-link' href='http://technorati.com/tag/mylvmbackup' rel='tag' target='_self'>mylvmbackup</a>, <a class='technorati-link' href='http://technorati.com/tag/mysql' rel='tag' target='_self'>mysql</a>, <a class='technorati-link' href='http://technorati.com/tag/package' rel='tag' target='_self'>package</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://blog.hokkertjes.nl/2009/02/24/mylvmbackup-making-it-cooperate-with-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL on Lenny and permissions</title>
		<link>http://blog.hokkertjes.nl/2008/08/22/mysql-on-lenny-and-permissions/</link>
		<comments>http://blog.hokkertjes.nl/2008/08/22/mysql-on-lenny-and-permissions/#comments</comments>
		<pubDate>Fri, 22 Aug 2008 09:40:59 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[a_bit_strange]]></category>
		<category><![CDATA[credentials]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[lenny]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[permissions]]></category>

		<guid isPermaLink="false">http://blog.hokkertjes.nl/?p=501</guid>
		<description><![CDATA[Ok, had something strange that I think is worth a share. I just upgraded a virtual machine to Lenny and installed MySQL and phpMyAdmin and apache and the like. Created a user for a Django project I&#8217;m working on and it couldn&#8217;t connect. I tried resetting the password several times, didn&#8217;t help. Then, out of [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, had something strange that I think is worth a share. I just upgraded a virtual machine to <a href="http://www.debian.org/releases/lenny/">Lenny</a> and installed MySQL and phpMyAdmin and apache and the like. Created a user for a Django project I&#8217;m working on and it couldn&#8217;t connect. I tried resetting the password several times, didn&#8217;t help. Then, out of frustration, I tried connecting without a password and&#8230; it worked!</p>
<p>Apparantly, by default, the MySQL in Lenny created access rules that allow all local users to access the database without a password. These have priority over the specific user controls. A bit unexpected and I suspect others to run into this. Could make you search for a problem if you&#8217;re installing a shared webhosting machine with a local MySQL database.</p>
<p>Solution:<br />
<code>delete from mysql.user where User='';</code></p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Tags: <a class='technorati-link' href='http://technorati.com/tag/a_bit_strange' rel='tag' target='_self'>a_bit_strange</a>, <a class='technorati-link' href='http://technorati.com/tag/credentials' rel='tag' target='_self'>credentials</a>, <a class='technorati-link' href='http://technorati.com/tag/debian' rel='tag' target='_self'>debian</a>, <a class='technorati-link' href='http://technorati.com/tag/fix' rel='tag' target='_self'>fix</a>, <a class='technorati-link' href='http://technorati.com/tag/lenny' rel='tag' target='_self'>lenny</a>, <a class='technorati-link' href='http://technorati.com/tag/mysql' rel='tag' target='_self'>mysql</a>, <a class='technorati-link' href='http://technorati.com/tag/permissions' rel='tag' target='_self'>permissions</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://blog.hokkertjes.nl/2008/08/22/mysql-on-lenny-and-permissions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
