<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[沧海一粟]]></title> 
<link>http://www.dzhope.com/index.php</link> 
<description><![CDATA[Web系统架构与服务器运维,php开发]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[沧海一粟]]></copyright>
<item>
<link>http://www.dzhope.com/post//</link>
<title><![CDATA[linux下安装第二个mysql实例过程]]></title> 
<author>jed &lt;jed521@163.com&gt;</author>
<category><![CDATA[服务器技术]]></category>
<pubDate>Wed, 20 Mar 2013 07:46:55 +0000</pubDate> 
<guid>http://www.dzhope.com/post//</guid> 
<description>
<![CDATA[ 
	<div class="code"><br/>tar zxvf mysql-5.5.3-m3.tar.gz<br/>cd mysql-5.5.3-m3/<br/><br/>./configure --prefix=/usr/local/mysql2/ --with-tcp-port=3307 --with-unix-socket-path=/tmp/mysql2.sock --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-big-tables --with-readline --with-ssl --with-embedded-server --enable-local-infile --with-plugins=partition,innobase,myisammrg<br/><br/>make &amp;&amp; make install<br/><br/>cp /usr/local/mysql2/share/mysql/my-medium.cnf /etc/my2.cnf<br/><br/>cp /usr/local/mysql2/share/mysql/mysql.server /etc/init.d/mysql2<br/><br/></div><br/><br/>修改服务文件<br/><div class="code"><br/>vi /etc/rc.d/init.d/mysql2<br/></div><br/><br/>将引用的配置文件名称由my.cnf改为当前要使用的配置文件my2.cnf，将my.cnf改成my2.cnf<br/><br/><div class="code"><br/># Try to find basedir in /etc/my.cnf<br/>&nbsp;&nbsp;conf=/etc/my.cnf<br/>&nbsp;&nbsp;print_defaults=<br/>&nbsp;&nbsp;if test -r $conf<br/>&nbsp;&nbsp;then<br/></div><br/><br/>在$bindir/mysqld_safe中添加--defaults-file=/etc/my2.cnf<br/><br/>修改成下面<br/><br/><div class="code"><br/> # may be overwritten at next upgrade.<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$bindir/mysqld_safe --defaults-file=/etc/my2.cnf&nbsp;&nbsp;--datadir=&quot;$datadir&quot; --pid-file=&quot;$mysqld_pid_file_path&quot; $other_args &gt;/dev/null 2&gt;&amp;1 &amp;<br/></div><br/><br/>保存。<br/><br/>初始化数据库<br/><div class="code"><br/>/usr/local/mysql2/bin/mysql_install_db --defaults-file=/etc/my2.cnf --basedir=/usr/local/mysql2/ --datadir=/usr/local/mysql2/var/ --user=mysql<br/></div><br/><br/><div class="code"><br/>chown -R mysql /usr/local/mysql2/var<br/>chgrp -R mysql /usr/local/mysql2/.<br/>chmod 755 /etc/init.d/mysql2<br/>chkconfig --level 345 mysql2 on<br/>service mysql2 start<br/></div><br/><br/>至此安装完毕，可以启动一下，看是否有该进程<br/><div class="code"><br/> netstat -tlnap &#124; grep mysql<br/></div><br/><br/><br/><div class="code"><br/>/usr/local/mysql2/bin/mysql -uroot -p --socket=/tmp/mysql2.sock<br/></div><br/><br/><div class="code"><br/>change master to master_host=&#039;0.0.0.0&#039;, master_user=&#039;replication&#039;,master_password=&#039;00000&#039;, master_log_file=&#039;mysql-bin.000005&#039;, master_log_pos=107,MASTER_PORT=3306; <br/></div><br/><br/>要指定端口，要不用的是本实例默认端口。<br/><br/><br/>Tags - <a href="http://www.dzhope.com/tags/mysql/" rel="tag">mysql</a> , <a href="http://www.dzhope.com/tags/mysql%25E5%25AE%2589%25E8%25A3%2585/" rel="tag">mysql安装</a>
]]>
</description>
</item><item>
<link>http://www.dzhope.com/post//#blogcomment</link>
<title><![CDATA[[评论] linux下安装第二个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.dzhope.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>