<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Chrooting MySQL on Debian</title>
	<atom:link href="http://blog.blackdown.de/2005/03/04/chrooting-mysql-on-debian/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.blackdown.de/2005/03/04/chrooting-mysql-on-debian/</link>
	<description>Juergen Kreileder&#039;s boring blog</description>
	<lastBuildDate>Sat, 13 Mar 2010 10:00:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1-RC1-jk1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Juergen Kreileder</title>
		<link>http://blog.blackdown.de/2005/03/04/chrooting-mysql-on-debian/comment-page-1/#comment-57234</link>
		<dc:creator>Juergen Kreileder</dc:creator>
		<pubDate>Fri, 25 Jan 2008 17:31:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/03/08/chrooting-mysql-on-debian/#comment-57234</guid>
		<description>Al, I don&#039;t get the context of your code excerpt.
(And I always get a bad feeling when I see code like the first line of your check_login.php. Think SQL injection.)</description>
		<content:encoded><![CDATA[<p>Al, I don&#8217;t get the context of your code excerpt.<br />
(And I always get a bad feeling when I see code like the first line of your check_login.php. Think SQL injection.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Al</title>
		<link>http://blog.blackdown.de/2005/03/04/chrooting-mysql-on-debian/comment-page-1/#comment-57233</link>
		<dc:creator>Al</dc:creator>
		<pubDate>Fri, 25 Jan 2008 07:17:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/03/08/chrooting-mysql-on-debian/#comment-57233</guid>
		<description>getMessage());
}

$db_object-&gt;setFetchMode(DB_FETCHMODE_ASSOC);

// we write this later on, ignore for now.

include(&#039;check_login.php&#039;);

?&gt;


-------------------------------------------------

&#039;**********check_login.php**********
query(&quot;SELECT password FROM users WHERE username = &#039;&quot;.$_SESSION[&#039;username&#039;].&quot;&#039;&quot;);

	if(DB::isError($pass) &#124;&#124; $pass-&gt;numRows() != 1) {
		$logged_in = 0;
		unset($_SESSION[&#039;username&#039;]);
		unset($_SESSION[&#039;password&#039;]);
		// kill incorrect session variables.
	}

	$db_pass = $pass-&gt;fetchRow();

	// now we have encrypted pass from DB in 
	//$db_pass[&#039;password&#039;], stripslashes() just incase:

	$db_pass[&#039;password&#039;] = stripslashes($db_pass[&#039;password&#039;]);
	$_SESSION[&#039;password&#039;] = stripslashes($_SESSION[&#039;password&#039;]);



	//compare:



	if($_SESSION[&#039;password&#039;] == $db_pass[&#039;password&#039;]) { 
		// valid password for username
		$logged_in = 1; // they have correct info
					// in session variables.
	} else {
		$logged_in = 0;
		unset($_SESSION[&#039;username&#039;]);
		unset($_SESSION[&#039;password&#039;]);
		// kill incorrect session variables.
	}
}


// clean up
unset($db_pass[&#039;password&#039;]);

$_SESSION[&#039;username&#039;] = stripslashes($_SESSION[&#039;username&#039;]);

?&gt;</description>
		<content:encoded><![CDATA[<p>getMessage());<br />
}</p>
<p>$db_object-&gt;setFetchMode(DB_FETCHMODE_ASSOC);</p>
<p>// we write this later on, ignore for now.</p>
<p>include(&#8216;check_login.php&#8217;);</p>
<p>?&gt;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>&#8216;**********check_login.php**********<br />
query(&#8220;SELECT password FROM users WHERE username = &#8216;&#8221;.$_SESSION['username'].&#8221;&#8216;&#8221;);</p>
<p>	if(DB::isError($pass) || $pass-&gt;numRows() != 1) {<br />
		$logged_in = 0;<br />
		unset($_SESSION['username']);<br />
		unset($_SESSION['password']);<br />
		// kill incorrect session variables.<br />
	}</p>
<p>	$db_pass = $pass-&gt;fetchRow();</p>
<p>	// now we have encrypted pass from DB in<br />
	//$db_pass['password'], stripslashes() just incase:</p>
<p>	$db_pass['password'] = stripslashes($db_pass['password']);<br />
	$_SESSION['password'] = stripslashes($_SESSION['password']);</p>
<p>	//compare:</p>
<p>	if($_SESSION['password'] == $db_pass['password']) {<br />
		// valid password for username<br />
		$logged_in = 1; // they have correct info<br />
					// in session variables.<br />
	} else {<br />
		$logged_in = 0;<br />
		unset($_SESSION['username']);<br />
		unset($_SESSION['password']);<br />
		// kill incorrect session variables.<br />
	}<br />
}</p>
<p>// clean up<br />
unset($db_pass['password']);</p>
<p>$_SESSION['username'] = stripslashes($_SESSION['username']);</p>
<p>?&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Al</title>
		<link>http://blog.blackdown.de/2005/03/04/chrooting-mysql-on-debian/comment-page-1/#comment-57232</link>
		<dc:creator>Al</dc:creator>
		<pubDate>Fri, 25 Jan 2008 07:13:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/03/08/chrooting-mysql-on-debian/#comment-57232</guid>
		<description>Try using another DB conection file that works - It worked for me</description>
		<content:encoded><![CDATA[<p>Try using another DB conection file that works &#8211; It worked for me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Juergen Kreileder</title>
		<link>http://blog.blackdown.de/2005/03/04/chrooting-mysql-on-debian/comment-page-1/#comment-57207</link>
		<dc:creator>Juergen Kreileder</dc:creator>
		<pubDate>Wed, 09 Jan 2008 23:23:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/03/08/chrooting-mysql-on-debian/#comment-57207</guid>
		<description>Josh, which Debian or Ubuntu distribution do you have?</description>
		<content:encoded><![CDATA[<p>Josh, which Debian or Ubuntu distribution do you have?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh Wilkins</title>
		<link>http://blog.blackdown.de/2005/03/04/chrooting-mysql-on-debian/comment-page-1/#comment-57205</link>
		<dc:creator>Josh Wilkins</dc:creator>
		<pubDate>Wed, 09 Jan 2008 19:55:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/03/08/chrooting-mysql-on-debian/#comment-57205</guid>
		<description>Juergen, I get the same error as viktor.  I cannot figure out what it is I need to do.

-Josh</description>
		<content:encoded><![CDATA[<p>Juergen, I get the same error as viktor.  I cannot figure out what it is I need to do.</p>
<p>-Josh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Juergen Kreileder</title>
		<link>http://blog.blackdown.de/2005/03/04/chrooting-mysql-on-debian/comment-page-1/#comment-54079</link>
		<dc:creator>Juergen Kreileder</dc:creator>
		<pubDate>Wed, 18 Apr 2007 20:30:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/03/08/chrooting-mysql-on-debian/#comment-54079</guid>
		<description>Viktor, &lt;code&gt;log_daemon_msg&lt;/code&gt; is defined in &lt;code&gt;/lib/lsb/init-functions&lt;/code&gt;.  That file should get sourced early in &lt;code&gt;/etc/init.d/mysql&lt;/code&gt;.</description>
		<content:encoded><![CDATA[<p>Viktor, <code>log_daemon_msg</code> is defined in <code>/lib/lsb/init-functions</code>.  That file should get sourced early in <code>/etc/init.d/mysql</code>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Viktor</title>
		<link>http://blog.blackdown.de/2005/03/04/chrooting-mysql-on-debian/comment-page-1/#comment-54075</link>
		<dc:creator>Viktor</dc:creator>
		<pubDate>Wed, 18 Apr 2007 18:34:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/03/08/chrooting-mysql-on-debian/#comment-54075</guid>
		<description>Hi!

I tried do as you had written above, but when I start the /etc/init.d/mysql start file, it writes: &quot; line 108: log_daemon_msg: command not found&quot;.

I can not see anything suspicious in syslog file.

What can be the problem?

Thx for your response!

Viktor</description>
		<content:encoded><![CDATA[<p>Hi!</p>
<p>I tried do as you had written above, but when I start the /etc/init.d/mysql start file, it writes: &#8221; line 108: log_daemon_msg: command not found&#8221;.</p>
<p>I can not see anything suspicious in syslog file.</p>
<p>What can be the problem?</p>
<p>Thx for your response!</p>
<p>Viktor</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: a_l_a_n</title>
		<link>http://blog.blackdown.de/2005/03/04/chrooting-mysql-on-debian/comment-page-1/#comment-10229</link>
		<dc:creator>a_l_a_n</dc:creator>
		<pubDate>Sun, 30 Jul 2006 16:54:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/03/08/chrooting-mysql-on-debian/#comment-10229</guid>
		<description>Cool. Just wanted to make sure I wasnt negating the whole process or something stupid.

Thanks for the guide.</description>
		<content:encoded><![CDATA[<p>Cool. Just wanted to make sure I wasnt negating the whole process or something stupid.</p>
<p>Thanks for the guide.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Juergen Kreileder</title>
		<link>http://blog.blackdown.de/2005/03/04/chrooting-mysql-on-debian/comment-page-1/#comment-10225</link>
		<dc:creator>Juergen Kreileder</dc:creator>
		<pubDate>Sun, 30 Jul 2006 15:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/03/08/chrooting-mysql-on-debian/#comment-10225</guid>
		<description>The command for the pid file is correct: It creates a link to &lt;code&gt;$CHROOT_DIR/var/run/mysqld/mysqld.pid&lt;/code&gt; in the &lt;strong&gt;directory&lt;/strong&gt; &lt;code&gt;/var/run/mysqld&lt;/code&gt;. That means the resulting link name is &lt;code&gt;/var/run/mysqld/mysqld.pid&lt;/code&gt;.

Creating a link for the socket is definitely an option if an application uses hard-coded paths and you can&#039;t or don&#039;t want to use networking (host: 127.1, port: 3306).</description>
		<content:encoded><![CDATA[<p>The command for the pid file is correct: It creates a link to <code>$CHROOT_DIR/var/run/mysqld/mysqld.pid</code> in the <strong>directory</strong> <code>/var/run/mysqld</code>. That means the resulting link name is <code>/var/run/mysqld/mysqld.pid</code>.</p>
<p>Creating a link for the socket is definitely an option if an application uses hard-coded paths and you can&#8217;t or don&#8217;t want to use networking (host: 127.1, port: 3306).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: a_l_a_n</title>
		<link>http://blog.blackdown.de/2005/03/04/chrooting-mysql-on-debian/comment-page-1/#comment-10224</link>
		<dc:creator>a_l_a_n</dc:creator>
		<pubDate>Sun, 30 Jul 2006 13:38:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/03/08/chrooting-mysql-on-debian/#comment-10224</guid>
		<description>I dont know if this was appropriate or not, but I had to add

ln -sf $CHROOT_DIR/var/run/mysqld/mysqld.sock /var/run/mysqld.sock

to /etc/init.d/mysql also, as amaroK was trying to use this missing socket file to connect to MySQL.

Also, I assume it was a typo, I had to change the line in the howto to:

ln -sf $CHROOT_DIR/var/run/mysqld/mysqld.pid /var/run/mysqld.pid

(Note the .pid on the end of the new symlink)</description>
		<content:encoded><![CDATA[<p>I dont know if this was appropriate or not, but I had to add</p>
<p>ln -sf $CHROOT_DIR/var/run/mysqld/mysqld.sock /var/run/mysqld.sock</p>
<p>to /etc/init.d/mysql also, as amaroK was trying to use this missing socket file to connect to MySQL.</p>
<p>Also, I assume it was a typo, I had to change the line in the howto to:</p>
<p>ln -sf $CHROOT_DIR/var/run/mysqld/mysqld.pid /var/run/mysqld.pid</p>
<p>(Note the .pid on the end of the new symlink)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Juergen Kreileder</title>
		<link>http://blog.blackdown.de/2005/03/04/chrooting-mysql-on-debian/comment-page-1/#comment-2506</link>
		<dc:creator>Juergen Kreileder</dc:creator>
		<pubDate>Sat, 06 May 2006 23:02:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/03/08/chrooting-mysql-on-debian/#comment-2506</guid>
		<description>swiergot, did you change &quot;/etc/init.d/mysql&quot; like described above?</description>
		<content:encoded><![CDATA[<p>swiergot, did you change &#8220;/etc/init.d/mysql&#8221; like described above?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: swiergot</title>
		<link>http://blog.blackdown.de/2005/03/04/chrooting-mysql-on-debian/comment-page-1/#comment-2360</link>
		<dc:creator>swiergot</dc:creator>
		<pubDate>Fri, 05 May 2006 16:10:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/03/08/chrooting-mysql-on-debian/#comment-2360</guid>
		<description>Hi. I have a problem with shutting down mysqld. Soon after mysqladmin does its work, mysqld_safe resumes mysqld process. Do you know how to fix it?</description>
		<content:encoded><![CDATA[<p>Hi. I have a problem with shutting down mysqld. Soon after mysqladmin does its work, mysqld_safe resumes mysqld process. Do you know how to fix it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WebhostingTech</title>
		<link>http://blog.blackdown.de/2005/03/04/chrooting-mysql-on-debian/comment-page-1/#comment-13</link>
		<dc:creator>WebhostingTech</dc:creator>
		<pubDate>Tue, 03 May 2005 10:35:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/03/08/chrooting-mysql-on-debian/#comment-13</guid>
		<description>&lt;strong&gt;Chrooting Apache, MySQL und Bind unter Debian&lt;/strong&gt;

Ein sehr schönes Tutorial stellt uns Juergen Kreileder zur Verfügung. Das Tutorial erklärt dem Nutzer, wie er unter Debian die Datenbankanwendung MySQL aus einer chroot-Umgebung starten kann. Außerdem finden sich dort zwei Links um den Apache Webse...</description>
		<content:encoded><![CDATA[<p><strong>Chrooting Apache, MySQL und Bind unter Debian</strong></p>
<p>Ein sehr schönes Tutorial stellt uns Juergen Kreileder zur Verfügung. Das Tutorial erklärt dem Nutzer, wie er unter Debian die Datenbankanwendung MySQL aus einer chroot-Umgebung starten kann. Außerdem finden sich dort zwei Links um den Apache Webse&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: slink</title>
		<link>http://blog.blackdown.de/2005/03/04/chrooting-mysql-on-debian/comment-page-1/#comment-1</link>
		<dc:creator>slink</dc:creator>
		<pubDate>Fri, 25 Mar 2005 17:51:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/03/08/chrooting-mysql-on-debian/#comment-1</guid>
		<description>Hi. It&#039;s a great tutorial. If someone would like to reach MySQL in PHP, modify php.ini too.</description>
		<content:encoded><![CDATA[<p>Hi. It&#8217;s a great tutorial. If someone would like to reach MySQL in PHP, modify php.ini too.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
