<?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>Hack MySQL Blog &#187; MySQL Sandbox</title>
	<atom:link href="http://hackmysql.com/blog/tag/mysql-sandbox/feed/" rel="self" type="application/rss+xml" />
	<link>http://hackmysql.com/blog</link>
	<description></description>
	<lastBuildDate>Fri, 27 Jan 2012 00:00:41 +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>Setting the MySQL Sandbox prompt</title>
		<link>http://hackmysql.com/blog/2009/11/15/setting-the-mysql-sandbox-prompt/</link>
		<comments>http://hackmysql.com/blog/2009/11/15/setting-the-mysql-sandbox-prompt/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 20:49:50 +0000</pubDate>
		<dc:creator>Daniel Nichter</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[MySQL Sandbox]]></category>

		<guid isPermaLink="false">http://hackmysql.com/blog/?p=74</guid>
		<description><![CDATA[This is far from deeply technical but little things that should be simple but aren&#8217;t annoy me. I found that MySQL Sandbox --prompt_prefix and --prompt_body don&#8217;t &#8220;just work.&#8221; I wanted the prompt to be mysql \v> . So I tried: make_sandbox_from_source /mysql/src/mysql-4.0.30 single --prompt_body=' \v> ' sh: -c: line 0: syntax error near unexpected token [...]]]></description>
			<content:encoded><![CDATA[<p>This is far from deeply technical but little things that should be simple but aren&#8217;t annoy me.  I found that <a href="https://launchpad.net/mysql-sandbox">MySQL Sandbox</a> <code>--prompt_prefix</code> and <code>--prompt_body</code> don&#8217;t &#8220;just work.&#8221;  I wanted the prompt to be <code>mysql \v> </code>.  So I tried:<br />
<code><br />
make_sandbox_from_source /mysql/src/mysql-4.0.30 single --prompt_body=' \v> '<br />
sh: -c: line 0: syntax error near unexpected token `newline'<br />
sh: -c: line 0: `make_sandbox /mysql/src/mysql-4.0.30/4.0.30   --prompt_body= \v> '<br />
</code><br />
Maybe my shell knowledge is more terrible than I realize so I verified that &#8216;<code> \v> </code>&#8216; does not need special escaping:<br />
<code><br />
echo ' \v> '<br />
 \v><br />
</code><br />
Ok, so clearly it&#8217;s the fault of <code>make_sandbox_from_source</code>.  I tried and tried to do this on the command line but failed.  I decided to try <code>~/.msandboxrc</code>, specifying:<br />
<code><br />
prompt_prefix=mysql<br />
prompt_body= \v><br />
</code><br />
That didn&#8217;t work either; it created the prompt <code>'mysql4.0.30&gt;</code>.  The leading space for <code>prompt_body</code> is ignored and there&#8217;s an errant apostrophe at the start.  The final working version is:<br />
<code><br />
prompt_prefix=mysql<br />
prompt_body=\v> '<br />
</code><br />
You can&#8217;t see it but there&#8217;s a trailing space after &#8220;mysql&#8221; for the <code>prompt_prefix</code> which is not ignored (unlike leading space for the <code>prompt_body</code>).</p>
]]></content:encoded>
			<wfw:commentRss>http://hackmysql.com/blog/2009/11/15/setting-the-mysql-sandbox-prompt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

