<?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>Tristan Media Blog &#187; Web Dev</title>
	<atom:link href="http://blog.tristanmedia.com/category/web-dev/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tristanmedia.com</link>
	<description>One can never have enough scripting languages: Notes on Perl, PHP, and Ruby</description>
	<lastBuildDate>Sun, 11 Jul 2010 01:10:53 +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>MacPorts annoyance with PHP and MySQL</title>
		<link>http://blog.tristanmedia.com/2009/10/macports-annoyance-with-php-and-mysql/</link>
		<comments>http://blog.tristanmedia.com/2009/10/macports-annoyance-with-php-and-mysql/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 17:36:25 +0000</pubDate>
		<dc:creator>Barry</dc:creator>
				<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[macports]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.tristanmedia.com/?p=86</guid>
		<description><![CDATA[I'm doing some local WordPress development, so I set up Apache, PHP, and MySQL using MacPorts. Apparently, the default setup does not set the location of the MySQL socket for you, so I copied /opt/local/etc/php5/php.ini-development to /opt/local/etc/php5/php.ini and changed these lines: pdo_mysql.default_socket=/opt/local/var/run/mysql5/mysqld.sock mysql.default_socket =/opt/local/var/run/mysql5/mysqld.sock mysqli.default_socket =/opt/local/var/run/mysql5/mysqld.sock]]></description>
			<content:encoded><![CDATA[<p>I'm doing some local WordPress development, so I set up Apache, PHP, and MySQL using <a href="http://www.macports.org/">MacPorts</a>.  Apparently, the default setup does not set the location of the MySQL socket for you, so I copied /opt/local/etc/php5/php.ini-development to /opt/local/etc/php5/php.ini and changed these lines:</p>
<pre>
pdo_mysql.default_socket=/opt/local/var/run/mysql5/mysqld.sock
mysql.default_socket =/opt/local/var/run/mysql5/mysqld.sock
mysqli.default_socket =/opt/local/var/run/mysql5/mysqld.sock
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.tristanmedia.com/2009/10/macports-annoyance-with-php-and-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Notes on mysql replication in Ubuntu hardy</title>
		<link>http://blog.tristanmedia.com/2008/09/notes-on-mysql-replication-in-ubuntu-hardy/</link>
		<comments>http://blog.tristanmedia.com/2008/09/notes-on-mysql-replication-in-ubuntu-hardy/#comments</comments>
		<pubDate>Mon, 08 Sep 2008 23:53:30 +0000</pubDate>
		<dc:creator>Barry</dc:creator>
				<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[replication]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog2.tristanmedia.com/2008/09/notes-on-mysql-replication-in-ubuntu-hardy/</guid>
		<description><![CDATA[I'm moving some sites currently on shared hosting to Slicehost: and setting up MySQL replication so I can run backups from the slave and push them to Amazon S3 storage on a regular basis using s3sync. This ONLamp article gives a handy step-by-step guide. One thing that got me though, was that I had set [...]]]></description>
			<content:encoded><![CDATA[<p>I'm moving some sites currently on shared hosting to <a href="https://manage.slicehost.com/customers/new?referrer=a8284dea9d9b5be8497b288872559c4d">Slicehost</a>: and setting up MySQL replication so I can run backups from the slave and push them to Amazon S3 storage on a regular basis using <a href="http://s3sync.net/wiki">s3sync</a>.</p>
<p>This ONLamp <a href="http://www.onlamp.com/pub/a/onlamp/2005/06/16/MySQLian.html">article</a> gives a handy step-by-step guide.  One thing that got me though, was that I had set up iptables to firewall my servers, and I needed to get my master and slave able to talk to each other without opening up MySQL to the whole world.  My solution was to email Slicehost and request private IP addresses for both servers.  </p>
<p>I then changed this line in /etc/mysql/my.cnf from</p>
<pre>
bq. bind-address          = 127.0.0.1
</pre>
<p>to</p>
<pre>
bq. bind-address          = my private IP address
</pre>
<p>on each server.  Then I added this to my iptables rules on both:</p>
<pre>
-A INPUT -p tcp -m tcp --dport 3306 -j ACCEPT
</pre>
<p>I reloaded the iptables rules with iptables-restore, and then checked with telnet from another server outside of those 2 to make sure I couldn't reach port 3306.</p>
<p>The next problem I encountered was an error like this when I restarted the slave after copying over the data in the master to get started:</p>
<pre>
error: 'Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)'
</pre>
<p>A search of the Ubuntu forums gave me this <a href="http://ubuntuforums.org/archive/index.php/t-112505.html">thread</a> which explained that debian uses a file called /etc/mysql/debian.cnf for that user password, and when I moved things over from the master DB, I changed the password for that user.  The solution is to change to password in that file on the slave to the same password found on the master.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tristanmedia.com/2008/09/notes-on-mysql-replication-in-ubuntu-hardy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
