<?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>workbench @ haefelinger.it &#187; mediawiki</title>
	<atom:link href="http://workbench.haefelinger.it/archives/tag/mediawiki/feed" rel="self" type="application/rss+xml" />
	<link>http://workbench.haefelinger.it</link>
	<description>Notes, thouhts and other stuff on software development</description>
	<lastBuildDate>Wed, 07 Apr 2010 07:02:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Mediawiki on MacPorts</title>
		<link>http://workbench.haefelinger.it/archives/1</link>
		<comments>http://workbench.haefelinger.it/archives/1#comments</comments>
		<pubDate>Wed, 02 Sep 2009 19:11:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[admin]]></category>
		<category><![CDATA[macports]]></category>
		<category><![CDATA[macosx]]></category>
		<category><![CDATA[mediawiki]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://workbench.haefelinger.it/?p=1</guid>
		<description><![CDATA[The installation of <a href="http://en.wikipedia.org/wiki/Mediawiki">Mediawiki</a> is not without pain, especially when using <a href="http://en.wikipedia.org/wiki/Macports">MacPorts</a> on <a href="http://en.wikipedia.org/wiki/Macos_x">MacOS X</a>. A repeating problem is the location of <a href="http://en.wikipedia.org/wiki/Mysql">MySQL</a>'s socket file. For unkown or rather questionable reasons, MacPorts moved that file from it's default location in folder <code>/tmp</code> to <code>/opt/local/var/run/mysql5/mysqld.sock </code> 
[..]]]></description>
			<content:encoded><![CDATA[<p>The installation of <a href="http://en.wikipedia.org/wiki/Mediawiki">Mediawiki</a> is not without pain, especially when using <a href="http://en.wikipedia.org/wiki/Macports">MacPorts</a> on <a href="http://en.wikipedia.org/wiki/Macos_x">MacOS X</a>. A repeating problem is the location of <a href="http://en.wikipedia.org/wiki/Mysql">MySQL</a>&#8217;s socket file. For unkown or rather questionable reasons, MacPorts moved that file from it&#8217;s default location in folder <code>/tmp</code> to </p>
<pre>
/opt/local/var/run/mysql5/mysqld.sock
</pre>
<p>Even  worse, the file&#8217;s name, usually <code>mysql.sock</code>, has now changed into <code>mysqld.sock</code>. So it comes to no surprise that applications like PHP, Mediawiki and oh-you-name-it simply choke. Except if you also install those via MacPorts. Then you may have a chance that it works. </p>
<p>Personnally however I don&#8217;t like this <em>all-or-nothing</em> approach. Ideally I would like to have a system where MacPorts lives in a friendly coexistence with tools not provided by MacPorts.  Wouldn&#8217;t it be good if there were a kind of <em>registry</em> knowing about locations? Unfortunatly, such a registry beast is still missing on UNIX based platforms. As much as I like the UNIX approach, all those config file locations and dialects drives me crazy. </p>
<p>So how would Mediawiki know that my MySQL&#8217;s configuration file is burried deep in <code>/opt/local/etc</code> and that furthermore, MySQL got pached to use that fancy location mentioned above? </p>
<p>Well, it simply can&#8217;t figure it out.</p>
<p>Now, you may think that&#8217;s no problem then. We just tell Mediawiki where it is. That&#8217;s not going to work either as long as you are unwilling to wrestle with Mediawikis PHP code: joy-oh-joy, it&#8217;s just hardwired to <code>/tmp/mysql.sock</code>. Period. So, what you need to do is to ask good old <code><a href="http://en.wikipedia.org/wiki/Ln_%28Unix%29">ln</a> -s</code> for rescue:</p>
<pre>
% sudo ln -s /opt/local/var/run/mysql5/mysqld.sock /tmp/mysql.sock
</pre>
<p>This works eventually but it&#8217;s really ugly cause the problem with links is that after a while no one knows why this link was created in the first place.</p>
<p>Happy Hacking.</p>
]]></content:encoded>
			<wfw:commentRss>http://workbench.haefelinger.it/archives/1/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
