主库配置   192.168.1.20
[mysqld]
port            = 3306
socket          = /tmp/mysql.sock
#skip-locking
skip-external-locking
key_buffer_size = 1024M
max_allowed_packet = 1M
table_open_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
#skip-grant-tables
log-bin= mysql-bin
server-id=20
binlog-do-db=androiddb从库配置 192.168.1.200
[mysqld]
port            = 3306
socket          = /tmp/mysql.sock
skip-locking
key_buffer = 384M
max_allowed_packet = 1M
table_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 32M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8
server-id = 200
master-host =192.168.1.20
master-user =********
master-pass =********
master-port =3306
master-connect-retry=60
replicate-do-db =androiddb
binlog_format=mixed
log-bin=mysql-bin

解决方案 »

  1.   

    主从不一致  从上没这个表tb_advertising重做slave吧
      

  2.   


    我把从库表重新建立了一次  
    那个错误没了  出现了lave I/O thread: connected to master '[email protected]:3306',replication started in log 'mysql-bin.000056' at position 7276212
    131121 16:53:07 [ERROR] Slave SQL: Error 'Unknown column 'loop' in 'tb_advertising_config'' on query. Default database: 'androiddb'. Query: 'Alter table `androiddb`.`tb_advertising_config`   找不到“loop”这一列,这列是主表很久之前建立的,后来已经删除了  这可怎么办  我要把主库数据备份过来还原一下吗?