server 1 :
/etc/my.cnf
[mysqld]
# номер сервера, у всех реплицируемых серверов они должны быть уникальными
server-id = 1
log-bin = mysql-bin
# конфигурация серера, как мастера
log-bin = /var/lib/mysql/mysql-bin
# конфигурация сервера, как слейва
relay-log = /var/lib/mysql/mysql-relay-bin
relay-log-index = /var/lib/mysql/mysql-relay-bin.index
replicate-do-db = test_db
server 2 :
/etc/my.cnf
[mysqld]
# номер сервера, у всех реплицируемых серверов они должны быть уникальными
server-id = 1
log-bin = mysql-bin
# конфигурация серера, как мастера
log-bin = /var/lib/mysql/mysql-bin
# конфигурация сервера, как слейва
relay-log = /var/lib/mysql/mysql-relay-bin
relay-log-index = /var/lib/mysql/mysql-relay-bin.index
replicate-do-db = test_db
==============================================================
mysql @server_1 :
mysql> CHANGE MASTER TO MASTER_HOST='server_2', MASTER_PORT=N, MASTER_USER='NAME', MASTER_PASSWORD='PASSWORD';
GRANT REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'NAME'@'%' IDENTIFIED BY 'PASSWORD';
mysql @server_2 :
mysql> CHANGE MASTER TO MASTER_HOST='server_1',
MASTER_PORT=N,
MASTER_USER='NAME',
MASTER_PASSWORD='PASSWORD';
GRANT REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'NAME'@'%' IDENTIFIED BY 'PASSWORD';
==================================================================
in case of :
ERROR 1201 (HY000): Could not initialize master info structure; more error messages can be found in the MySQL error log) ... :
1. read mysql err file.
2. mysql>STOP SLAVE;
3. mysql>RESET SLAVE;
4. mysql>START SLAVE;
==================================================================
thats all.
30 July, 2011
02 July, 2011
spikko + asterisk + freepbx = friends
Outgoing Settings :
host=sip.spikko.comusername=*username*
secret=*password*
type=peer
disallow=all
allow=g729&gsm&ulaw&alaw
nat=no
port=5090
fromuser=*username*
insecure=port,invite
call-limit=1
directmedia=no
Incoming Settings :
USER Context: *username*secret=*password*
type=user
context=from-trunk
username=*username*
canreinvite=no
insecure=port,invite
disallow=all
allow=g729&gsm&ulaw&alaw
call-limit=2
directmedia=no
Registration :
Register String: *username*:*password*@sip.spikko.com:5090/*username*
Subscribe to:
Posts (Atom)