# groupadd mysql
# useradd -g mysql mysql
# mv mysql-max-5.0.27-linux-i686-glibc23 mysql
# cd mysql
# chown -R mysql:mysql .
# cp support-files/mysql.server /etc/rc.d/init.d/mysqld
# chmod +x /etc/rc.d/init.d/mysqld
# cp support-files/my-medium.cnf /etc/my.cnf
# scripts/mysql_install_db --user=mysql
# chkconfig --add mysqld
# ln -s /usr/local/mysql/bin/mysql /usr/bin/mysql
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+--------------+------------------+
| mysql-bin.000006 | 98 | zld | |
+------------------+----------+--------------+------------------+
1 row in set (0.00 sec)
master-host=10.99.99.50
master-user=bakup
master-passwor=123
master-port=3306
master-connect-retry=60
replicate-do-db=zld
log-bin
binlog-do-db=zld
sword='123',master_log_file='mysql-bin.000005',master_log_pos=98;
mysql>slave start
Slave_IO_State:
Master_Host: 10.99.99.50
Master_User: bakup
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000004
Read_Master_Log_Pos: 98
Relay_Log_File: test-relay-bin.000001
Relay_Log_Pos: 98
Relay_Master_Log_File: mysql-bin.000004
Slave_IO_Running: No
Slave_SQL_Running: Yes
Replicate_Do_DB: zld
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 98
Relay_Log_Space: 98
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
1 row in set (0.00 sec)
Slave_IO_State: Waiting for master to send event
Master_Host: 10.99.99.50
Master_User: bakup
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000004
Read_Master_Log_Pos: 98
Relay_Log_File: test-relay-bin.000003
Relay_Log_Pos: 235
Relay_Master_Log_File: mysql-bin.000004
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB: zld
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 98
Relay_Log_Space: 235
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: 0
1 row in set (0.01 sec)