Mysql

Hi at all, I'm trying to setting my cluster. i've read this http://67.18.187.140/viewtopic.php?p=32 … 46442fb631">http://67.18.187.140/viewtopic.php?p=32875&sid=0cd7ebb6989f5f0371b9e646442fb631 and i want to know in which mode i can resolve my problem, the same problem. thank you

3 Replies

@freddy:

which mode i can resolve my problem
Would be helpful if you described the "problem" you are having and what type of cluster you are referring to.

Travis

Hi and thanks for the reply.

I've configured apache, drbd and mysql with the guide of cluster labs(Cluster from Scratch) and mysql.com (http://dev.mysql.com/doc/refman/5.6/en/ … mysql.html">http://dev.mysql.com/doc/refman/5.6/en/ha-drbd-install-mysql.html).

I've copied /var/lib/mysql and my.cnf on drbd device, created a symbolic link on /etc/my.cnf but mysql doesn't works.

This is my crm_mon:

Online: [ server2 server1 ]

Resource Group: mysql

fs_mysql (ocf::heartbeat:Filesystem): Started server2

ClusterIP (ocf::heartbeat:IPaddr2): Started server2

mysqld (ocf::heartbeat:mysql): Stopped

WebSite (lsb:apache2): Stopped

Master/Slave Set: msdrbdmysql

Masters: [ server2 ]

Slaves: [ server1 ]

Failed actions:

mysqldstart0 (node=server2, call=15, rc=4, status=complete): insufficient privileges

mysqldstart0 (node=server1, call=15, rc=4, status=complete): insufficient privileges

And this is my crm configuration:

node server1 \

attributes standby="off"

node server2 \

attributes standby="off"

primitive ClusterIP ocf:heartbeat:IPaddr2 \

params ip="10.10.7.100" cidr_netmask="32" \

op monitor interval="30s"

primitive WebSite lsb:apache2

primitive drbd_mysql ocf:linbit:drbd \

params drbd_resource="r0" \

op monitor interval="15s"

primitive fs_mysql ocf:heartbeat:Filesystem \

params device="/dev/drbd/by-res/r0" directory="/data/" fstype="ext3"

primitive mysqld ocf:heartbeat:mysql \

params binary="/usr/bin/mysqld_safe" config="/etc/mysql/my.cnf" user="mysql" group="mysql" log="/var/log/mysql.log" socket="/var/run/mysqld/mysqld.sock" datadir="/data/mysql/data"

group mysql fs_mysql ClusterIP mysqld WebSite

ms msdrbdmysql drbd_mysql \

meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1" notify="true"

colocation mysqlondrbd inf: mysql msdrbdmysql:Master

order mysqlafterdrbd inf: msdrbdmysql:promote mysql:start

property $id="cib-bootstrap-options" \

dc-version="1.0.9-unknown" \

cluster-infrastructure="openais" \

expected-quorum-votes="2" \

stonith-enabled="false" \

no-quorum-policy="ignore" \

last-lrm-refresh="1306924621"

rsc_defaults $id="rsc-options" \

resource-stickiness="100"

Thanks a lot for your help.

Hi , I've found the problem, pacemaker haven't the privileges for create the file mysqld.sock, in fact if I stop one server and create mysqld.sock manually with 777 and own mysql:mysql, after restart corosync, it works…

but this is only a temporary solution because when corosync is stopped on that machine, it delete the file socks and I have again the error.

Someone can help me for resolve this problem with the privileges?

thanks

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct