Source code mysql5.6
  upload mysql Install package to server ( virtual machine )
 <>1. Install dependency and compilation tools 
yum -y install gcc gcc-c++ cmake ncurses-devel autoconf 
 <>2. decompression MySQL Source installation package 
tar zxf mysql-5.6.10.tar.gz cd mysql-5.6.10 
 <>3. testing , to configure 
cmake . 
 <>4. compile 
make 
 <>5. install 
make install 
 <>6. to configure 
cd /usr/local/mysql/support-files/ 
 <>6.1  Prepare profile 
cp my-default.cnf /etc/my.cnf 
 <>6.2  Ready to start mysql script 
cp mysql.server /etc/init.d/mysqld 
 <>6.3  initialization mysql
 useradd mysql chown -R mysql.mysql /usr/local/mysql cd /usr/local/mysql/
scripts./mysql_install_db --user=mysql --datadir=/usr/local/mysql/data --basedir
=/usr/local/mysql 
 <>6.4  to mysql Command to make a soft connection 
ln -s /usr/local/mysql/bin/* /usr/local/sbin/ 
 <>6.5  Copy boot file to /etc/init.d/mysql
cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql 
 <>7. start-up mysql
service mysqld start 
 <>8. Change profile , Enable binary logging , stay [mysqld] Add the following configuration below 
vim /etc/my.cnf 
 <>9. To authorized users ( Main operation )
mysql> reset master; mysql> grant replication slave on *.* to 'tom'@
'192.168.59.%' identified by '123'; mysql> flush privileges; 
 <>10. View binary log ( Main operation )
show master status; +------------------+----------+--------------+-------------
-----+ | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | +------------------
+----------+--------------+------------------+ | mysql-bin.000001 | 331 | | | +-
-----------------+----------+--------------+------------------+ 
 <>11. Sign in mysql, Perform synchronization master operation 
 stop it slave, Stop synchronization , Start modifying information  stop slave;  write master Information about  change master to -> master_host=
'192.168.189.161', \\master of ip address  -> master_user='tom', \\ Sign in master Users used  -> 
master_password='123', \\ Sign in master Use password  -> master_log_file='mysql-bin.000001', 
\\master Binary log file currently written -> master_log_pos=331; \\ The latest location of the current binary log   Open from , Start synchronization  start slave; 
 <>12. see slave state , View when synchronization started successfully 
show slave status \G; 
Technology