Attila:<br><br>Hope this helps:<br><pre class="wiki">primitive p_mysql ocf:heartbeat:mysql \
        params binary="/usr/sbin/mysqld" config="/etc/mysql/my.cnf" \ 
            replication_user="xxx" replication_passwd="xxx" \ 
            test_passwd="password" pid="/var/run/mysqld/mysqld.pid" \ 
            socket="/var/run/mysqld/mysqld.sock" \
        params additional_parameters="--skip-slave-start \
             --log-bin=/var/log/mysql/mysqld-bin.log \
             --relay-log=/var/log/mysql/mysqld-relay-bin.log" \
        op start interval="0" timeout="120" \
        op stop interval="0" timeout="120" \
        op promote interval="0" timeout="120" \
        op demote interval="0" timeout="120" \
        op monitor interval="30" timeout="30" OCF_CHECK_LEVEL="1"
</pre><pre class="wiki">ms ms_mysql p_mysql \
        meta notify="true" master-max="1" clone-max="2"
</pre><pre class="wiki">colocation sql-master-ip-with-ms_sql-master inf: sql-master-ip ms_mysql:Master
colocation sql-slave-ip-with-ms_sql-slave inf: sql-slave-ip ms_mysql:Slave
</pre>~Mike<br><br><br><div class="gmail_quote">On Sun, Nov 6, 2011 at 9:34 AM, Florian Haas <span dir="ltr"><<a href="mailto:florian@hastexo.com">florian@hastexo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 2011-11-05 18:20, Attila Megyeri wrote:<br>
> Hello,<br>
><br>
><br>
><br>
> I am having a hard time configuring a relatively simple mysql environment.<br>
><br>
><br>
><br>
> What I’d like to achieve is:<br>
><br>
> ·         One master and a slave, with replication<br>
><br>
> ·         Relatively quick failover if the master node, or Mysql fail.<br>
><br>
><br>
><br>
> I tried the Mysql cluster approach, but seemed to be too slow, and to<br>
> many limitations (foreign keys, triggers, views, etc).<br>
><br>
><br>
><br>
> I decided to go with the Mysql replication.<br>
<br>
</div>You want a simple 2-node MySQL cluster with failover? Why not go with<br>
DRBD then, as everyone else would in that situation?<br>
<div class="im"><br>
> Tried to use the mysql RA from clusterlabs 3.9.2 – but no luck,<br>
> replicaiton simply did not work out.<br>
<br>
</div>Sorry to say this, but as a co-author of that agent I'll say that that's<br>
exactly the kind of feedback we strongly dislike, as it doesn't help us<br>
at all improving the agent, or its documentation. So,<br>
<br>
- What were you trying to achieve?<br>
- What was your configuration?<br>
- What went wrong?<br>
- What were you unable to fix?<br>
<br>
For the DRBD based approach (which I would highly recommend), do<br>
consider taking a look at<br>
<a href="http://www.hastexo.com/content/mysql-high-availability-sprint-launch-pacemaker" target="_blank">http://www.hastexo.com/content/mysql-high-availability-sprint-launch-pacemaker</a>.<br>
We'll be happy to provide you with the virtual images used in this<br>
tutorial, so you can set things up yourself in a cleanroom testing<br>
environment.<br>
<br>
Cheers,<br>
Florian<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Need help with High Availability?<br>
<a href="http://www.hastexo.com/now" target="_blank">http://www.hastexo.com/now</a><br>
<br>
_______________________________________________<br>
Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</a><br>
<a href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker" target="_blank">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a><br>
<br>
Project Home: <a href="http://www.clusterlabs.org" target="_blank">http://www.clusterlabs.org</a><br>
Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" target="_blank">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a><br>
Bugs: <a href="http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker" target="_blank">http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker</a><br>
</font></span></blockquote></div><br>