Operating Environment
Main: 192.168.1.124
From: 192.168.1.125
Mysql-5.0.56.tar.gz, centos5.2
Database 1:/data/3306/Database 2:/data/3307/
1, modify the main library my.cnf
============================
# VI/ETC/MY.CNF
Server-id = 1
Log-bin
============================
2, restart the main library effective
=======================
#/data/3306/mysql stop
#/data/3306/mysql start
=======================
3, landing the main library
================================
#mysql-uroot-p-s/data/3306/mysql.sock
================================
4, given from the library permissions account, allowing users in the main Library load table and load DATA
====================================================================
Mysql> GRANT file,select,replication SLAVE on *.* to repl@192.168.1.125 identified by ' 123456 ';
====================================================================
5, check whether the success of the creation
====================================================================
Select User,host from Mysql.user;
================================================
6, lock the main library table
===========================
Mysql> FLUSH TABLES with READ LOCK;
===========================