<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://www.jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://www.jackxiang.com/post//</link>
<title><![CDATA[mysql 启动多个实例]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Mon, 10 Nov 2008 06:37:06 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	/usr/bin/mysqld_safe&nbsp;&nbsp; --defaults-file=/etc/my.cnf&nbsp;&nbsp; --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --socket=/var/lib/mysql/mysql.sock &amp;<br/><br/>./bin/mysqld_safe --defaults-file=./my.cnf --default-character-set=utf8<br/><br/>load data from master<br/><br/><br/>先是配置启动一个默认的3306，然后复制一个my.cnf到另外一个目录里面，比如：data2,然后再修改一下：<br/><br/><div class="code">&#91;mysqld&#93;<br/>port&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 3309<br/>socket&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= /tmp/mysql_3309.sock<br/><br/>&#91;client&#93;<br/>#password&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = your_password<br/>port&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 3309&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br/>socket&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= /tmp/mysql_3309.sock</div><br/><br/>mysql -S /tmp/mysql_3309.sock&nbsp;&nbsp;就登入了。。。<br/><br/><br/><br/>启动多个实例：<br/><br/>/usr/local/mysql/bin/mysqld_safe --defaults-file=/usr/local/mysql/data2/my.cnf --pid-file=/usr/local/mysql/data2/mysqld_3307.pid&nbsp;&nbsp;--log-error=/usr/local/mysql/data2/mysqld_3307.log.erro<br/>以上容易导致：Can&#039;t create/write to file &#039;/usr/local/mysql/data2/mysqld_3307.pid&#039; 是由于：/usr/local/mysql/data2/目录权限是root不是mysql用户导致！<br/>为此：<br/>/usr/local/mysql/bin/mysqld_safe --defaults-file=/usr/local/mysql/data2/my.cnf --pid-file=/tmp/mysqld_3307.pid --log-error=/usr/local/mysql/data2/mysqld_3307.log.erro --user=mysql&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>这句就ok了，为此，我们chown -R mysql /usr/local/mysql/data2/&nbsp;&nbsp;后上面也就ok了。。。<br/>
]]>
</description>
</item><item>
<link>http://www.jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] mysql 启动多个实例]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>