三:修改从库my.cnf文件如下,注意红色字体部分,重启数据库实例
- [root@dg54 ~]# grep -v '^#' /etc/my.cnf |grep -v '^$'
- [client]
- port = 3306
- socket = /tmp/MySQL.sock
- [mysqld]
- port = 3306
- socket = /tmp/mysql.sock
- skip-external-locking
- key_buffer_size = 256M
- max_allowed_packet = 1M
- table_open_cache = 256
- sort_buffer_size = 1M
- read_buffer_size = 1M
- read_rnd_buffer_size = 4M
- myisam_sort_buffer_size = 64M
- thread_cache_size = 8
- query_cache_size= 16M
- thread_concurrency = 8
- innodb_data_home_dir =
- innodb_data_file_path = /dev/raw/raw6:1Graw
- log-bin=mysql-bin
- binlog_format=mixed
- server-id = 2
- log-bin=mysql-bin
- replicate-do-db=test
- replicate-do-db=bbs
- [mysqldump]
- quick
- max_allowed_packet = 16M
- [mysql]
- no-auto-rehash
- [myisamchk]
- key_buffer_size = 128M
- sort_buffer_size = 128M
- read_buffer = 2M
- write_buffer = 2M
- [mysqlhotcopy]
- interactive-timeout
- [root@dg54 ~]# service mysqld restart
- Shutting down MySQL..[ OK ]
- Starting MySQL..[ OK ]
